JDK-4857939 : two keys producing the same key code in japanese keyboard
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2003-05-02
  • Updated: 2003-05-03
  • Resolved: 2003-05-03
Related Reports
Duplicate :  
Description

Name: gm110360			Date: 05/02/2003


FULL PRODUCT VERSION :
java plugin version 1.4.1_02

FULL OS VERSION :
windows 2000

A DESCRIPTION OF THE PROBLEM :
On a japanese keyboard layout,
when local IME is enabeld in kana mode and if we try the backslah key and the yen key, both produces the  same keycode 92 (VK_BACKSLASH) though they produces different  correct expected characters.
The correct behaviour includes distinguishing  between these two keys from the keycodes as well as they are two different keys,
may be by defining another key code for Ro or Yen key .I havent seen any key code defined yet for Ro or Yen in the API.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Enable local IME in kana mode in a japanese keyboard
press \ or Ro key (Key next to right shift key)and look for the key code it produces in java
Press yen key (key next to Back Space) and look for the key code it produces in java

Thoug the two key events produces different key chars,it still gives the same keycode 92


EXPECTED VERSUS ACTUAL BEHAVIOR :
Diffferent key codes for the above two key events as they are two different
keys with diferent key char representation.
Thoug the two key events produces different key chars,it still gives the same keycode 92 for both the keys


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
nay simple program which displays the key events as we press the keys will do
---------- END SOURCE ----------
(Review ID: 185072) 
======================================================================

Comments
EVALUATION I don't think this is strictly a duplicate of 4474756, since this bug does not require the Robot. However, they have the same cause. I would be worried about adding a new keycode for Ro or Yen at this point, since we have been using VK_BACK_SLASH for several releases now. I don't want to break backwards compatibility. However, perhaps I can use KeyEvent.getKeyLocation to distinguish between the two keys (see 4857421). ###@###.### 2003-05-02
02-05-2003