<AWT Dev> <AWT dev> Review request for JDK-8155740: [macosx] robot.keyPress and robot.keyRelease do not generate key event for Alt-Graph key VK_ALT_GRAPH.
semyon.sadetsky at oracle.com
Thu May 12 15:58:45 UTC 2016
Just a few questions to clarify on the fix.
What is difference between AXUIElementPostKeyboardEvent and
Why the latter was commented? Does it mean that valid modifier keys have
not been sent by AWT robot?
On 5/12/2016 10:45 AM, Manajit Halder wrote:
> Hi All,
> Kindly review the fix for JDK9.
> *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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev