[8] Review request for JDK-8020209: [macosx] Mac OS X key event confusion for "COMMAND PLUS"

Leonid Romanov leonid.romanov at oracle.com
Mon Sep 9 04:20:14 PDT 2013


Hello,
This is a bug with a long history. It all started with 1* followed by 2*. What looked like a perfectly fine approach back then has caused us a number of problems ever since, like 3* and all the other similar menu related issues that followed. JDK-8020209 is the latest in the series. What happens in  JDK-8020209 is that Cocoa calls -performKeyEquivalent twice: first for "Cmd =" followed by the call for "Cmd +". 
If you look at all these bugs, it will become evident that the crux of the problem is that we use  -performKeyEquivalent to intercept key events that don't go through -keyDown, so this patch is an attempt to fix it. In order to make these events to go through -keyDown, I have to override a SPI method, like Mozilla and Chrome do. I couldn't find any other way to achieve it. As for whether it would be considered as Private API usage, I've already asked this question on macosxport-dev mailing list, see 4*. The answer was that I need to submit private JDK build to the App Store and see if it gets accepted. I'l do do it if reviewers agree with my fix.
I gave this fix limited testing by running a number of regression tests and Netbeans, and haven't found any issues with it. 

Bug: http://bugs.sun.com/view_bug.do?bug_id=8020209
Webrev: http://cr.openjdk.java.net/~leonidr/8020209/webrev.00/

1. http://bugs.sun.com/view_bug.do?bug_id=7131196
2. http://bugs.sun.com/view_bug.do?bug_id=7142565
3. http://bugs.sun.com/view_bug.do?bug_id=7160951
4. http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-September/004849.html


Thanks,
Leonid.




More information about the macosx-port-dev mailing list