-
Enhancement
-
Resolution: Unresolved
-
P3
-
None
-
6
-
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.
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.