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

Robot should release all keys and mouse buttons on exit

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • 6
    • client-libs
    • Fix Understood
    • generic
    • generic

      This is related to bug 4711763 : Robot key and mousePress() should strongly encourage use of matching Release().

      When Robot.keyPress() is called, it is usually necessary to call the matching keyRelease() call for proper operation of the system after the Java app has exited. However, even with the correct Robot calls in an app, it's possible to exit unexpectedly without calling Robot.keyRelease(). This can be avoided to a fair extent by placing Robot.keyRelease() calls inside of a catch() block, but not many apps are written this way.

      A more robust solution would be to automatically release, upon exit, any keys and mouse buttons that Robot has pressed. It is galactically unlikely that this will cause any backward-compatibility problems, and even so we could provide a flag to supress this behavior.

            denis Denis Fokin (Inactive)
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: