Login  Register

NEWT key pressed event sended twice for some keys

Posted by jouvieje on Jul 03, 2013; 7:12pm
URL: https://forum.jogamp.org/NEWT-key-pressed-event-sended-twice-for-some-keys-tp4029506.html

I'm using lastest 2.0.2 rc12 on windows 7 x64.

There is a problem with auto-repeat for the arrow keys (left, up, down, right) in newt. When one of these keys is pressed and release quickly (so the key auto-repeated should not appear), the events received by newt are:
 1) pressed at t0
 2) pressed at t1 with modifier autorepeat mask
 3) released at t1
Obviously, the event 2 should not be send by newt in this case.

This only happens with arrow keys, and other keys does not receives this extra pressed event.
As far as I can see, this extra event is send by WindowDriver.sendKeyEvent, and by breakpointing, both WindowDriver.repeatKey and keyCode being 0 (ie VK_UNDEFINED).
This bug therefore exists for all other key event with an undefined keyCode (page up, ...).

EDIT: this seem to be related to bugzilla #766 https://jogamp.org/bugzilla/show_bug.cgi?id=766
Jérôme