From 77075a2d6661d8fc5192b944f7359a236408adc2 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sun, 24 Nov 2013 17:25:02 +0000 Subject: [PATCH] Cocoa: more Function-key shortcuts in menus --- src/GUI/FGCocoaMenuBar.mm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/GUI/FGCocoaMenuBar.mm b/src/GUI/FGCocoaMenuBar.mm index 254e3e0c0..9ec02523a 100644 --- a/src/GUI/FGCocoaMenuBar.mm +++ b/src/GUI/FGCocoaMenuBar.mm @@ -69,7 +69,15 @@ public: static void setFunctionKeyShortcut(const std::string& shortcut, NSMenuItem* item) { unichar shortcutChar = NSF1FunctionKey; - if (shortcut == "F11") { + if (shortcut == "F1") { + shortcutChar = NSF1FunctionKey; + } else if (shortcut == "F2") { + shortcutChar = NSF2FunctionKey; + } else if (shortcut == "F3") { + shortcutChar = NSF3FunctionKey; + } else if (shortcut == "F10") { + shortcutChar = NSF10FunctionKey; + } else if (shortcut == "F11") { shortcutChar = NSF11FunctionKey; } else if (shortcut == "F12") { shortcutChar = NSF12FunctionKey;