JDK-7154512 : [macosx] Keyboard shortcut actions performed multiple times
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u4
  • Priority: P2
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: os_x
  • CPU: x86
  • Submitted: 2012-03-16
  • Updated: 2012-05-15
  • Resolved: 2012-05-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u6Resolved 8Resolved
Related Reports
Relates :  
Relates :  
Description
Product Version = NetBeans IDE Dev (Build 201203090400) (#9a710a8e3e80)
Operating System = Mac OS X version 10.7.3 running on amd64
Java; VM; Vendor = 1.7.0_04-ea; Java HotSpot(TM) 64-Bit Server VM 23.0-b16; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 1.7.0_04-ea-b15

http://netbeans.org/bugzilla/show_bug.cgi?id=209302

Steps to reproduce in NetBeans IDE:
- create PHP project and edit php file
- press Cmd+W to close
=> very often the dialog asking to save/discard changes is opened twice

Another scenario in NetBeans IDE:
- try to toggle bookmark in editor (php file) using Shift+Cmd+M
=> the bookmark icon sometimes hides and displays but sometimes nothing happens (like if the keyboard shortcut was pressed twice very fast)

Maybe related to bug #7147817 which was fixed in 7u4 b13 and verified by NetBeans QA.

Comments
EVALUATION The simple test below reproduces the problem with SHIFT+META+M. Just look if the "M" KEY_PRESSED events are printed as you type. It will be fixed in 7154072. The test should also reproduce the other issue, because if key events are doubled it shouldn't be netbeans-specific. I'm asking the submitter to try it in the same environment he reproduced the bug with netbeans. import java.awt.*; import java.awt.event.*; public class Test { public static void main(String[] args) { Frame f = new Frame("Frame"); TextField t = new TextField("text"); f.add(t); f.pack(); f.setVisible(true); t.addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent ke) { System.out.println(ke); } public void keyReleased(KeyEvent ke) { System.out.println(ke); } public void keyPressed(KeyEvent ke) { System.out.println(ke); } }); } }
21-03-2012

EVALUATION I reproduced the issue with META+SHIFT+M. It relates to 7154072. However, the problem is not that key event are duplicated but just the reverse - some events are swallowed. The issue by the way can be reproduced with a simple test case. The issue with META+W is not reproduced.
20-03-2012