Change from InputEvent.CTRL_MASK to
Toolkit.getDefaultToolkit().getMenuShortcutKeyMask() for mac.