summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-30 07:36:07 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-30 07:36:07 +0200
commit63dcdcec0a3a66b9754f3bcce595f88145c00991 (patch)
tree55d9bbe98fb6e2896d7ddd39584b479d975b5b18 /src
parentc96a4f3141259d412b249144086492ec4c400355 (diff)
macOS: support FL_Up,FL_Down,FL_Left,FL_Right system menu item shortcuts
Diffstat (limited to 'src')
-rw-r--r--src/Fl_MacOS_Sys_Menu_Bar.mm8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Fl_MacOS_Sys_Menu_Bar.mm b/src/Fl_MacOS_Sys_Menu_Bar.mm
index c08c08069..d40bbbb13 100644
--- a/src/Fl_MacOS_Sys_Menu_Bar.mm
+++ b/src/Fl_MacOS_Sys_Menu_Bar.mm
@@ -188,6 +188,14 @@ const char *Fl_Mac_App_Menu::quit = "Quit %@";
mac_key = NSBackspaceCharacter;
} else if (key == FL_Delete) {
mac_key = NSDeleteCharacter;
+ } else if (key == FL_Up) {
+ mac_key = NSUpArrowFunctionKey;
+ } else if (key == FL_Down) {
+ mac_key = NSDownArrowFunctionKey;
+ } else if (key == FL_Left) {
+ mac_key = NSLeftArrowFunctionKey;
+ } else if (key == FL_Right) {
+ mac_key = NSRightArrowFunctionKey;
}
[self setKeyEquivalent:[NSString stringWithCharacters:&mac_key length:1]];
[self setKeyEquivalentModifierMask:mod];