Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4684001

Can't distinguish between yen and kana ro keys on 106 keys japanese keyboard

XMLWordPrintable

    • x86
    • windows_2000, windows_xp

      Please refer to Incident Manager report #146515.

      J2SE 1.4 on Windows 2000 platform.
      When using a 106 key japanese keyboard, the yen key on the top row of keyboard, and the kana ro key both have the same keycode and keychar values (92 and yen symbol). Consequently our application cannot tell the difference between these keys.

      This is a regression. In 1.3.1 then ro had keycode 0, and keychar yen symbol.

      Here is some trivial code to print all key events deleivered to a frame:

      import java.applet.*;
      import java.awt.*;
      import java.awt.event.*;

      public class KeyTest {

          public static void main(String args[]) {
              Frame frame = new Frame("KeyTest program");
              frame.addKeyListener(new KeyListener() {
                      public void keyTyped(KeyEvent e) {
                          System.out.println(e);
                      }
                      
                      public void keyPressed(KeyEvent e) {
                          System.out.println(e);
                      }

                      public void keyReleased(KeyEvent e) {
                          System.out.println(e);
                      }
                  });
              frame.addWindowListener(new WindowAdapter() {
                      public void windowClosing(WindowEvent e) {
                          System.exit(0);
                      }
                  });
              frame.setSize(200,200);;
              frame.setVisible(true);
              frame.requestFocus();
          }

      }

            yan Yuri Nesterenko
            rverabel Raghu Verabelli (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: