Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Unable to type certain characters into a JPasswordField Affected J2SE version: ====================== J2SE 6.0 from final to J2SE 6.0 Update 12 Affected Operating Systems: =========================== Linux (all tested Distributions incl. RedHat and SuSE Linux) Solaris 8, Solaris 9, Solaris 10 Error Description: ================== Characters using the "mode shift" modifier can not be typed into JTextComponents that are not input method enabled. Typing e.g. "@" (\u0x40, At-sign) or "?" (\u0x20ac, Euro sign) on a german keyboard where these characters are accessed using Alt-GR-q (@) and Alt-GR-e into a JPasswordField yields "q" or "e" instead of "@" and "?". This behaviour can be reproduced with ordinary JTextFields after calling enableInputMethods(false) on the JTextField. This behaviour is a regression from J2SE 5 where the above scenario worked fine. Reproduction: ============= A test case is included in KeyboardTest.jar. java -jar KeyboardTest.jar Type into password field on top of the window. In the field below the type text is mirrored (we use the same document to just display the text). In the text are below we output the received key events. Example Log (typing "@@@"): =========================== ============================================================ Operating system: Linux, 2.6.18.8-0.13-default Java VM version : 1.6.0_12 System locale : de_DE Default encoding: UTF8 ============================================================ Event type : KEY_PRESSED Event key code: 65406 Event key text: Alt Gr Event key char: "?" - 0xffff ============================================================ Event type : KEY_PRESSED Event key code: 81 Event key text: Q Event key char: "q" - 0x71 ============================================================ Event type : KEY_TYPED Event key code: 0 Event key text: Unknown keyCode: 0x0 Event key char: "q" - 0x71 ============================================================ Event type : KEY_RELEASED Event key code: 81 Event key text: Q Event key char: "q" - 0x71 ============================================================ Event type : KEY_PRESSED Event key code: 81 Event key text: Q Event key char: "q" - 0x71 ============================================================ Event type : KEY_TYPED Event key code: 0 Event key text: Unknown keyCode: 0x0 Event key char: "q" - 0x71 ============================================================ Event type : KEY_RELEASED Event key code: 81 Event key text: Q Event key char: "q" - 0x71 ============================================================ Hi all, Any updates on this one? The customer is expecting a fix, and I'd appreciate any information that we could share with them. Thanks, MS
|