If we set the DELETE(Fn+delete) key to the shortcut key of a menuitem, actionPerformed() of the menuitem is called twice. This problem is occurred when we run the attached code on MacOsX with java 1.7.0_10 or 1.7.0_11. 1.7.0_09 doesn't have this problem.
If we don't set System.setProperty("apple.laf.useScreenMenuBar", "true"), we don't have this problem.
To reproduce the Bug:
- Save/compile a test program "TaskKeyEvent.java" attached.
- Run it with 7u10 or later jdk on Mac OSX.
- Enter Fn+Delete
- Check output