Hi Manajit,
Just a few questions to clarify on the fix.
What is difference between AXUIElementPostKeyboardEvent and
CGEventCreateKeyboardEvent?
Why the latter was commented? Does it mean that valid modifier keys have
not been sent by AWT robot?
--Semyon
On 5/12/2016 10:45 AM, Manajit Halder wrote:
Hi All,
Kindly review the fix for JDK9.
*Bug*:
https://bugs.openjdk.java.net/browse/JDK-8155740
_
_
*Webrev*:
http://cr.openjdk.java.net/~mhalder/8155740/webrev.00/
<http://cr.openjdk.java.net/%7Emhalder/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