For the complete documentation index, see llms.txt. This page is also available as Markdown.

Edges, holds, and releases

Press edge

main {
    if(event_press(PS5_CROSS)) {
        set_val(TRACE_1, 1);
    }
}

Release edge

main {
    if(event_release(PS5_CROSS)) {
        set_val(TRACE_1, 0);
    }
}

Held long enough

main {
    if(get_ival(PS5_OPTIONS) && get_ptime(PS5_OPTIONS) >= 800) {
        set_val(TRACE_1, 1);
    }
}

get_ptime resets when the control changes truth state. It is suited to hold duration, not precision scheduling.


Double press

Always device-test the first press after script load and the exact threshold boundary.

Last updated