- All Implemented Interfaces:
- RawDevice, KeyListener, EventListener
public class DeviceOldKeyboard
extends Object
implements RawDevice, KeyListener
This class contains an ugly workaround for linux keyboard auto-repeat.
When a key released event arrives, it is noted and rescheduled,
whith a short sleep - so that there is time for the corresponding keyTyped
event to check in.
in the keyTyped method we mark a matching release event so that it is not executed.
so neither the keyPressed nor the keyReleased are processed.
This works for me much better than the previous version - anyway,
I guess one needs to tweak the sleep value depending on the machine...
TODO: use configuration attributes to configure raw devices if needed.
- Author:
- weissman