JDK-6499323 : Japanses keyboard, two different keys give same Java virtual key code
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0u9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2006-11-30
  • Updated: 2011-01-28
  • Resolved: 2006-12-01
Related Reports
Duplicate :  
Description
see comments for details

Comments
EVALUATION KeyEvent spec says, "Virtual key codes do not identify a physical key: they depend on the platform and keyboard layout." Now, pressing two identically marked keys on this keyboard, we receive two identical keysyms (0x5c on Solaris). True, they have different (native) keycodes because there are two physical keys, but we do not take that into account. And this 'many-to-one' is by design. There is an RFE 6182651 about improving this design. An excerpt from the RFE: [to provide] "- an extended keyCode could be given for unknown keys (this could be the underlying scancode, but has not to be so in every implementation as far as it is unique). The code is not the same on every platform but is guaranted to be unique for each key on a given platform/layout." That is what we will eventually do in jdk7, with permission. I don't think we'll add an extra VK to distinguish these keys or left/right location. On some Japanese keyboards it's hard to tell which of them is right or left. Now I'm closing this as a duplicate.
01-12-2006