Summary: | Certain NEWT keyPressed events (e.g. VK_UP, while VK_DOWN is down) don't fire on Windows. | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | mike <msiggy> |
Component: | core | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED DUPLICATE | ||
Severity: | major | CC: | andreas, gouessej, jerome.jouvie, msiggy |
Priority: | --- | ||
Version: | 1 | ||
Hardware: | pc_x86_64 | ||
OS: | windows | ||
Type: | --- | SCM Refs: | |
Workaround: | --- |
Description
mike
2013-06-25 04:14:49 CEST
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. |