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

Robot with VK_KANA_LOCK returns Xlib message on XAWT

XMLWordPrintable

    • Cause Known
    • other, x86
    • linux, solaris_2.5.1

      OPERATING SYSTEM(S)
      Linux SLES9 SP1 IA32, RHEL40 IA32
      FULL JDK VERSION(S):
       java version "1.5.0_04"
       Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
       Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
       
      DESCRIPTION:
      This problem was reproduced when using a Japanese 106 keyboard.
      Could you try with Japanese keyboard if you have one?
      If you do not have one, could you change OS keyboard setting to Japanese keyboard by yast or
      something, and try to reproduce the problem, please?
      The following test case gives this error:
       > java RobotTest
        VK_KANA_LOCK : Xlib: unexpected async reply (sequence 0x9b)!
         And this application is stopped.
      ======= RobotTest.java =========
      import java.awt.*;
      import java.awt.event.*;
      public class RobotTest {
        public static void main(String[] args){
          try{
            Robot r = new Robot();
            int height=(int)(java.awt.Toolkit.getDefaultToolkit().getScreenSize().getHeight());
            r.setAutoDelay(100);
            System.out.print("VK_KANA_LOCK : ");
            keyType(r, KeyEvent.VK_KANA_LOCK);
          }catch(java.awt.AWTException e){
            e.printStackTrace();
          }
          System.exit(0);
        }
        static void keyType(Robot r, int keycode){
          try{
            Thread.sleep(1000);
          }catch(InterruptedException e){
          }
          try{
            r.keyPress(keycode);
            r.keyRelease(keycode);
          }catch(IllegalArgumentException e){
            System.out.println("*** invalid key code ***");
            return;
          }
          System.out.println("OK");
        }
      }
      =============================
      ###@###.### 2005-07-15 15:54:31 GMT

            yan Yuri Nesterenko
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: