question: public static CustomShortcutSet createShortcut ( char ch ) { Character mnemonic = Character . valueOf ( ch ) ; String shortcut = SystemInfo . isMac && SystemInfo . isJavaVersionAtLeast ( "1.7" ) ? "control alt pressed " + mnemonic : "alt pressed " + mnemonic ; return CustomShortcutSet . fromString ( shortcut ) ; }
target:  Creates shortcut for mnemonic replacing standard Alt+Letter to Ctrl+Alt+Letter on Mac with jdk version newer than 6