From 63dcdcec0a3a66b9754f3bcce595f88145c00991 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 30 Sep 2022 07:36:07 +0200 Subject: macOS: support FL_Up,FL_Down,FL_Left,FL_Right system menu item shortcuts --- src/Fl_MacOS_Sys_Menu_Bar.mm | 8 ++++++++ 1 file changed, 8 insertions(+) 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]; -- cgit v1.2.3