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

Robot key and mousePress() should strongly encourage use of matching Release()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 5.0
    • 1.4.2
    • docs
    • b26
    • generic
    • generic

      I have tests which use Robot and make calls to keyPress() which do not call the corresponding keyRelease(). This can be a big problem because as far as the underlying operating system is concerned, the key is still being "held down". If the native GUI operates differently with that key down (for instance w/ CDE, if the Control key is held down, you can't drag windows around), running such a test can cause strange and undesireable behavior.

      The Robot.keyPress() and Robot.mousePress() methods should have some encouragement for developers to make sure they call the corresponding keyRelease()/mouseRelease() methods.

            sharonz Sharon Zakhour (Inactive)
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: