The solution, on a Windows environment is to have two bindings. One for keyPressed
which starts a Timer that continually fires at whatever interval you wish and another for a keyReleased
which stops the Timer.
See the last example from Motion Using the Keyboard for a complete example.
I'm not sure if this approach still works on a Mac, because I believe the order of events on a Mac is pressed, released, pressed, released.... when you hold the key down. So the starting/stopping of the Timer may not work as expected.