Key repeat on KeyInput?

Is there a trick to getting keys to send repeated events when held down?



I assume I'm missing something obvious.

Given the lack of response, either I'm asking something totally idiotic or am not making myself clear.



Let me try again:



I am adding a listener to KeyInput with KeyInput.get().addListener() but the listener seems to only be fired when the key is pressed or released.  Normally, one would expect a series of events to be fired if the key (in this case the "arrow" keys, e.g., KeyInput.KEY_LEFT, KeyInput.KEY_RIGHT, KeyInput.KEY_UP, and KeyInput.KEY_DOWN ) is pressed and held down.

The last boolean in the addAction method specifies whether the key allows repeats or not - set this to true and your performAction() will be called repeatedly while the key is pressed.



Hope that helps! :slight_smile:



      input.addAction(sout, InputHandler.DEVICE_KEYBOARD,
               KeyInput.KEY_RETURN, InputHandler.AXIS_NONE, true);

That looks as if it'll do it.  Thanx!