JDK-4295215 : wrong keyCode is returned for `@', `:' and `^' on japanese keyboards
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.2,1.3.0_01
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,linux
  • CPU: generic,x86
  • Submitted: 1999-11-30
  • Updated: 2000-07-25
  • Resolved: 2000-07-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
masaki.katakai@Japan 1999-11-30

wrong keyCode is returned for `@', `:' and `^'

It seems that getKeyCode() returns wrong keyCode for
`@', `:' and `^' on both Solaris and Windows platform.

Solaris
        `@' keyCode = 0 KeyChar = 64
        `:' keyCode = 0 KeyChar = 58
        `^' keyCode = 0 KeyChar = 94

Windows
        `@' keyCode = 0xC0 (VK_BACK_QUOTE) KeyChar = 64
        `:' keyCode = 0x3B (VK_SEMICOLON)  KeyChar = 58
        `^' keyCode = 0xDE (VK_QUOTE)      KeyChar = 94

According to KeyEvent.java, I think VK_AT, VK_COLON and
VK_CIRCUMFLEX should be returned.

Correct?
        `@' keyCode = VK_AT             (0x0200)
        `:' keyCode = VK_COLON          (0x0201)
        `^' keyCode = VK_CIRCUMFLEX     (0x0202)

masaki.katakai@Japan 1999-12-01

I use Japanese Type-5 keyboard for Solaris,
Japanese 106 keyboard for Windows.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta FIXED IN: merlin-beta INTEGRATED IN: merlin-beta
14-06-2004

EVALUATION The submitter is probably correct about the behavior. The keycodes are as they should be when using a standard US keyboard (on either a US or Japanese locale). I have not tested this with a Japanese keyboard, but I believe these keys are on the primary layer for those keyboards, and should generate the keycodes mentioned by the submitter. This issue was raised previously (bugid 4068241). I don't know whether the correct VK values were loaded into the keycode for keypressed/keyreleased events at that time, or not. eric.hawkes@eng 1999-12-02 I have a fix for the Solaris version of this bug (see bugid 4347983 for details). However, the fix on Windows will be completely different. In fact, I'm wondering whether Valeriy's work to map the OEM keys dynamically (bugid 4281176) might have fixed this on Windows. I have emailed the Sun contact / submitter to ask whether this bug still occurs on Windows with recent builds of Merlin. eric.hawkes@eng 2000-07-12 I've verified Windows 1.4.0beta-b22 returns correct VK. Thanks! masaki.katakai@Japan 2000-07-13
12-07-2000