FreeJoyWiki icon indicating copy to clipboard operation
FreeJoyWiki copied to clipboard

[Question] Continues repeated action while button pressed

Open pwn-d opened this issue 3 years ago • 0 comments

Hi there, is there an option to configure a button to trigger every x timeunits while holding it down or even encapsulate a certain action while holding down? My target is to use an flasher on my racing wheel, that flashes as long as I hold the button. In pseudo code either

while (button_is_pressed){
    //start ingame flasher animation
    press(button_flasher)
    // wait x.y seconds to press again
}

or

while (button_is_pressed){
    // light on
    press(button_light) 
    // wait x.y seconds

    // light off
    press(button_light) 
    // wait a.b seconds
}

Hopefully I didn't miss anything to obvious.

Cheers,

P.S. I love your project and thanks a lot

pwn-d avatar Feb 15 '22 16:02 pwn-d