Hi All,

Kindly review the fix for JDK9.

Bug: 
https://bugs.openjdk.java.net/browse/JDK-8155740 
<https://bugs.openjdk.java.net/browse/JDK-8155740>

Webrev: 
http://cr.openjdk.java.net/~mhalder/8155740/webrev.00/ 
<http://cr.openjdk.java.net/~mhalder/8155740/webrev.00/>

Issue: 
[macosx] robot.keyPress and robot.keyRelease do not generate key event for 
Alt-Graph key VK_ALT_GRAPH.

Cause: 
VK_ALT_GRAPH is a new key added to the Mac OS X platform and it is not mapped 
to any key on the OS X platform.

Fix: 
VK_ALT_GRAPH is mapped to right option (OSX_RightOption) key on Mac OS X.

Method Java_sun_lwawt_macosx_CRobot_keyEvent is modified for the following 
reason:
AXUIElementPostKeyboardEvent posts 0 key code for all  the modifier keys with 
key codes (16, 17,18, 20, 157) and also for newly added modifier key 
VK_ALT_GRAPH.
But it posts correct key code for all the other keys. On the other hand 
CGEventCreateKeyboardEvent posts correct key code for all the modifier keys and 
hence it is used to post modifier key events and AXUIElementPostKeyboardEvent 
is used to post all the remaining key events.

Regards,
Manajit

Reply via email to