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

robot throws exception

XMLWordPrintable

    • Cause Known
    • sparc
    • solaris_9

      platform: win 2000;
      locale: english;
      enable russian keyboard layout;
      java: 1.5.0-beta b51

      To reproduce error you can either try running attached code
      or
      change layout to RU and use robot to keyPress, keyRelease "[" and "]" onto some swing component.

      Exception in thread "main" java.lang.IllegalArgumentException: Invalid key code
      at sun.awt.windows.WRobotPeer.keyPress(Native Method)
      at java.awt.Robot.keyPress(Robot.java:220)
      at KeyTest.performTest(KeyTest.java:82)
      at KeyTest.<init>(KeyTest.java:30)
      at KeyTest.main(KeyTest.java:34)

      ==============

      Behavior is also questionable for ";", "'", ",", "/".

      "," corresponds to a russian "b", sometimes it gets printed by Robot correctly, when it is first in the queue of chars, but when it isn't it fails as well.
      ###@###.### 2004-06-01

      ==============

      German layout has similar issues.
      The following robot events either cause the exception (see above) or are mapped incorrectly: `, -, =, [, ], z, x, /. Capitilizing any of these keys with "Shift" doesn't work either.
      ###@###.### 2004-06-02

            denis Denis Fokin (Inactive)
            dvolodarsunw Dina Volodarskaya (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: