Summary: | NEWT KeyEvent key-char value on Windows not delivered w/ PRESSED induces UI lag if depending on key-char value | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | Sven Gothel <sgothel> |
Component: | windows | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | damichl73, gouessej |
Priority: | --- | ||
Version: | 1 | ||
Hardware: | All | ||
OS: | all | ||
Type: | --- | SCM Refs: |
jogl 90e136b65a10d8daf8c3a2df6cc193e55a63722c
jogl 85338858f5c58694fa88e77df1386d0556887944
jogl 4898f582d9303caa7fd1b44438808e86b51c2a3b
|
Workaround: | --- | ||
Bug Depends on: | |||
Bug Blocks: | 688 |
Description
Sven Gothel
2013-01-29 13:09:10 CET
It would be fine to keep this order consistent across platforms (if possible) instead of risking to break it all to favor Windows support. (In reply to comment #1) > It would be fine to keep this order consistent across platforms (if possible) > instead of risking to break it all to favor Windows support. Order is and will be consistent, just adapting to the fact that on Windows PRESSED and TYPED arrive at the 'same' time (hence both @ t0). So we can use TYPED for printable chars as the event trigger and have the key-char value consistent for all platforms for all KeyEventListener callbacks. regression w/ modifier keys .. need to properly deduce UTF-16 char value @ key PRESS/RELEASE to produce all events. May related to Bug 688, i.e. allows removal of TYPED event. jogl 2.0 rc-11 windows vista 32 bit java 1.6.0_39 german keyboard (qwertz) in keyTyped(), KeyEvent.getKeyChar() returns invalid values for the 'ß' key. problem 1 --------- 'ß' -> 'ß' (OK) 'ß' + SHIFT -> 'ß' (SHOULD BE '?') 'ß' + ALTGR -> 'ß' (SHOULD BE '\') problem 2 --------- the first time 'ß' gets typed after application startup: KeyEvent.getKeyEvent() returns 0 KeyEvent.getKeyChar() returns 65535 problem 3 --------- when typing 'ß' + ALTGR: KeyEvent.isAltGraphDown() returns false, but KeyEvent.isAltDown() AND KeyEvent.isAltControlDown() both return true. (In reply to comment #6) > jogl 2.0 rc-11 > windows vista 32 bit > java 1.6.0_39 > german keyboard (qwertz) > > in keyTyped(), KeyEvent.getKeyChar() returns invalid values for the 'ß' key. > > problem 1 > --------- > 'ß' -> 'ß' (OK) > 'ß' + SHIFT -> 'ß' (SHOULD BE '?') > 'ß' + ALTGR -> 'ß' (SHOULD BE '\') > > problem 2 > --------- > the first time 'ß' gets typed after application startup: > KeyEvent.getKeyEvent() returns 0 > KeyEvent.getKeyChar() returns 65535 'ß': KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [], KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [], KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [], - code 0x2d == VK_MINUS -> OK - sym 0x5b == VK_OPEN_BRACKET -> ERR, Win7 mapped it here to VK_OEM_4 '[{' key .. only valid for US *** ERROR *** > > problem 3 > --------- > when typing 'ß' + ALTGR: > KeyEvent.isAltGraphDown() returns false, but > KeyEvent.isAltDown() AND KeyEvent.isAltControlDown() both return true. Fixed ALTGR w/ commit4898f582d9303caa7fd1b44438808e86b51c2a3b , however, CTRL is down w/ German KBD and I dunno why. ALT + 'ß': KeyEvent[EVENT_KEY_PRESSED, code 0x12, sym 0x12, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [alt], KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt], KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt], KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt], KeyEvent[EVENT_KEY_RELEASED, code 0x12, sym 0x12, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [alt], 'ß' + ALT: KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [], KeyEvent[EVENT_KEY_PRESSED, code 0x12, sym 0x12, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [alt], KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt], KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char '�' (0xdf), isModifierKey false, isActionKey false, InputEvent[modifiers: [alt], KeyEvent[EVENT_KEY_RELEASED, code 0x12, sym 0x12, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [alt], ALTGR: KeyEvent[EVENT_KEY_PRESSED, code 0x11, sym 0x11, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl], KeyEvent[EVENT_KEY_PRESSED, code 0xff7e, sym 0x12, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl, altgr], KeyEvent[EVENT_KEY_RELEASED, code 0x11, sym 0x11, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl, altgr], KeyEvent[EVENT_KEY_RELEASED, code 0xff7e, sym 0x12, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [altgr], ALTGR + 'ß': KeyEvent[EVENT_KEY_PRESSED, code 0x11, sym 0x11, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl], KeyEvent[EVENT_KEY_PRESSED, code 0xff7e, sym 0x12, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl, altgr], KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char '\' (0x5c), isModifierKey false, isActionKey false, InputEvent[modifiers: [ctrl, altgr], KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char '\' (0x5c), isModifierKey false, isActionKey false, InputEvent[modifiers: [ctrl, altgr], KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char '\' (0x5c), isModifierKey false, isActionKey false, InputEvent[modifiers: [ctrl, altgr], KeyEvent[EVENT_KEY_RELEASED, code 0x11, sym 0x11, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [ctrl, altgr], KeyEvent[EVENT_KEY_RELEASED, code 0xff7e, sym 0x12, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [altgr], SHIFT + 'ß': KeyEvent[EVENT_KEY_PRESSED, code 0x10, sym 0x10, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [shift], KeyEvent[EVENT_KEY_PRESSED, code 0x2d, sym 0x5b, char '?' (0x3f), isModifierKey false, isActionKey false, InputEvent[modifiers: [shift], KeyEvent[EVENT_KEY_RELEASED, code 0x2d, sym 0x5b, char '?' (0x3f), isModifierKey false, isActionKey false, InputEvent[modifiers: [shift], KeyEvent[EVENT_KEY_TYPED, code 0x2d, sym 0x5b, char '?' (0x3f), isModifierKey false, isActionKey false, InputEvent[modifiers: [shift], KeyEvent[EVENT_KEY_RELEASED, code 0x10, sym 0x10, char '' (0x0), isModifierKey true, isActionKey false, InputEvent[modifiers: [shift], |