Hi Manajit,

Per our discussion, The cause of the problem is : 1), Key Event being sent from 
the OS to the application - which the Java layer processes it correctly
2) The Mac OS calling the handleAction function directly on the NSMenutItem - 
although as per your description, there is no code which maps the hot key to 
this widget in the native layer.
Ideally, since the OS is recognising the key combination, that key event should 
not be delivered again to the application. Or, it should be that the key event 
is not recognised and hence delivered to the application.

Can you check why in this case, we are getting the key event as well as the 
handleAction from the OS?

Thanks,
Krishna

> On 23-Feb-2019, at 9:14 PM, Manajit Halder <manajit.hal...@oracle.com> wrote:
> 
> Hi All,
> 
> Please review the fix for JDK13.
> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8216971 
> <https://bugs.openjdk.java.net/browse/JDK-8216971>
> 
> Webrev:
> http://cr.openjdk.java.net/~mhalder/8216971/webrev.00/ 
> <http://cr.openjdk.java.net/~mhalder/8216971/webrev.00/>
> 
> Fix:
> actionPerformed() was called twice due to wrong handling of key down event in 
> method handleAction, which is corrected with this fix. 
> This change was added during fix of issue JDK-8152492. Apart from the changes 
> required to fix the problem, code related to finding out 
> eventKey is removed as eventKey is no more used now. 
> 
> Note:
> This issue is regression of bug 8152492, which was introduced in JDK release 
> 9b120.
> 
> Regards,
> Manajit

Reply via email to