<AWT Dev> <AWT dev>[10] Review request for JDK-8163265: [macosx] numpad 0 instead of VK_0

Manajit Halder manajit.halder at oracle.com
Mon Oct 16 13:38:08 UTC 2017

Hi All,

Kindly review the fix for JDK10.

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

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

Wrong event code received for numbers 0 to 9 in case if any of the arrow keys (left, right, up and down) are pressed before pressing any of the number keys (0 to 9). Instead of number key event codes, NUMPAD number key event are received and the test fails. But if the arrow keys are not pressed before pressing the number keys  0 to 9 then correct key codes are received for the numbers and the test passes.

NSNumericPadKeyMask is used in the code to find out whether the number key pressed is number or NUMPAD number. But NSNumericPadKeyMask is also set if any of the arrow keys are pressed (NSUpArrowFunctionKey, NSDownArrowFunctionKey, NSLeftArrowFunctionKey, and NSRightArrowFunctionKey). 

To distinguish between the number and NUMPAD keys the key values are also checked because the key values are different for numbers and NUMPAD numbers.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20171016/82df765c/attachment.html>

More information about the awt-dev mailing list