|
|
commit 63dcdcec0a3a66b9754f3bcce595f88145c00991
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Sep 30 07:36:07 2022 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Sep 30 07:36:07 2022 +0200
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 src/Fl_MacOS_Sys_Menu_Bar.mm src/Fl_MacOS_Sys_Menu_Bar.mm
index c08c080..d40bbbb 100644
--- src/Fl_MacOS_Sys_Menu_Bar.mm
+++ 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];
[ Direct Link to Message ] | |
|
| |