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

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Mon Oct 16 21:42:25 UTC 2017


Looks fine.
Please update the @bugid in the test before the push.

On 16/10/2017 06:38, Manajit Halder wrote:
> Hi All,
> 
> Kindly review the fix for JDK10.
> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8163265
> 
> Webrev:
> http://cr.openjdk.java.net/~mhalder/8163265/webrev.00/
> 
> Issue:
> 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.
> 
> Cause:
> 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).
> 
> Fix:
> 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.
> 
> Regards,
> Manajit


-- 
Best regards, Sergey.


More information about the awt-dev mailing list