The keyPressed(KeyEvent e) input listener seems to miss certain key press events. I can most reliably reproduce it by pressing and holding down VK_RIGHT, then pressing VK_UP. The initial VK_UP pressed event never fires. Although subsequent VK_UP auto-repeat will fire. This seems to happen with any Action Key event. I don't remember this problem existing in rc10, so it must have arisen with the recent input handling changes
Please can you try some post RC11 aggregated builds to determine when this regression (if any) appeared?
Update: I tested this in an awt frame and it correctly fired the keyPressed event. That rules out any keyboard limitation or operating system limitation. So it must be a problem in NEWT somewhere. I will try to narrow down what release this started happening in.
I have tested w/ latest and I do receive e.g. VK_UP if VK_DOWN is being hold, maybe fixed w/ 460ad9822b2509865691258be851e62b85626677 for Bug 768.
.. testing further now .. w/ signed applets and NewtCanvasAWT, etc.
I am on Windows 7 64 bit, it could be a platform specific thing? When I get home I will try latest and see if its fixed.
It could be that the first VK_UP keyPressed event is being incorrectly marked as isAutoRepeat. Which would make the first keypress and the subsequent autorepeat presses indistinguishable. Just shooting out some ideas.
This seem related to my 'bugreport' post at jogamp forum: http://forum.jogamp.org/NEWT-key-pressed-event-sended-twice-for-some-keys-td4029506.html On windows, newt is not able to detect correctly arrow, page up, etc keys due to keyCode being undefined and generates extra preesed event with autorepet mask (see my post for more details).
(In reply to comment #7) > This seem related to my 'bugreport' post at jogamp forum: > http://forum.jogamp.org/NEWT-key-pressed-event-sended-twice-for-some-keys- > td4029506.html > > On windows, newt is not able to detect correctly arrow, page up, etc keys > due to keyCode being undefined and generates extra preesed event with > autorepet mask (see my post for more details). 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
(In reply to comment #7) > This seem related to my 'bugreport' post at jogamp forum: > http://forum.jogamp.org/NEWT-key-pressed-event-sended-twice-for-some-keys- > td4029506.html > > On windows, newt is not able to detect correctly arrow, page up, etc keys > due to keyCode being undefined and generates extra preesed event with > autorepet mask (see my post for more details). next time, pls copy/paste .. but thank you!
(In reply to comment #8) > (In reply to comment #7) > > This seem related to my 'bugreport' post at jogamp forum: > > http://forum.jogamp.org/NEWT-key-pressed-event-sended-twice-for-some-keys- > > td4029506.html > > > > On windows, newt is not able to detect correctly arrow, page up, etc keys > > due to keyCode being undefined and generates extra preesed event with > > autorepet mask (see my post for more details). > > 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 I have pressed: left, then down + right .. and similar timings combinations, see below. So bug 766 was the culprit, due to the '0' keyCode value .. Please do a git-pull compile and test - or wait for next aggregated build. +++ consumeKeyEvent(usr): KeyEvent[EVENT_KEY_PRESSED, code 0x95, sym 0x95, char '' (0x0), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1372887579633 d 0ms]]], consumed: false consumeKeyEvent(usr): KeyEvent[EVENT_KEY_RELEASED, code 0x95, sym 0x95, char '' (0x0), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1372887579883 d 0ms]]], consumed: false consumeKeyEvent(usr): KeyEvent[EVENT_KEY_PRESSED, code 0x98, sym 0x98, char '' (0x0), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1372887580053 d 0ms]]], consumed: false consumeKeyEvent(usr): KeyEvent[EVENT_KEY_PRESSED, code 0x97, sym 0x97, char '' (0x0), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1372887580313 d 0ms]]], consumed: false consumeKeyEvent(usr): KeyEvent[EVENT_KEY_RELEASED, code 0x98, sym 0x98, char '' (0x0), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1372887580333 d 0ms]]], consumed: false consumeKeyEvent(usr): KeyEvent[EVENT_KEY_RELEASED, code 0x97, sym 0x97, char '' (0x0), printable false, modifier false, action true, InputEvent[modifiers: [], NEWTEvent[source:jogamp.newt.driver.windows.WindowDriver, consumed false, when:1372887580598 d 0ms]]], consumed: false *** This bug has been marked as a duplicate of bug 768 ***
I can confirm this bug was resolved. Events are now firing properly on my machine with the latest build. Thanks Sven!
Hi, i have problems with missing input events in my java/jogl/newt application on mac os x, whereas the same code works perfectly on windows. is it possible that the fix was only applied to windows specific code? looking forward to hear from you! i hesitate to set the change the status of the bug anyway.