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);
}

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 ) ; }
creates shortcut for mnemonic replacing standard alt + letter to ctrl + alt + letter on mac with jdk version newer than 6
