summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-01 13:28:52 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-01 13:28:52 +0200
commit63a7942a6692ce1ec66746bd6fd3c16812125a48 (patch)
tree9b071e4eaf344c248c591ddad49813d6e684ef3b
parent4196daa77e727846952b11d20b94f457c591d6e4 (diff)
macOS: support 5 more keys as Fl_Sys_Menu_Bar item shortcuts.
-rw-r--r--src/Fl_MacOS_Sys_Menu_Bar.mm10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Fl_MacOS_Sys_Menu_Bar.mm b/src/Fl_MacOS_Sys_Menu_Bar.mm
index d40bbbb13..939a3a3d4 100644
--- a/src/Fl_MacOS_Sys_Menu_Bar.mm
+++ b/src/Fl_MacOS_Sys_Menu_Bar.mm
@@ -196,6 +196,16 @@ const char *Fl_Mac_App_Menu::quit = "Quit %@";
mac_key = NSLeftArrowFunctionKey;
} else if (key == FL_Right) {
mac_key = NSRightArrowFunctionKey;
+ } else if (key == FL_Page_Up) {
+ mac_key = NSPageUpFunctionKey;
+ } else if (key == FL_Page_Down) {
+ mac_key = NSPageDownFunctionKey;
+ } else if (key == FL_KP_Enter) {
+ mac_key = 0x2324; // "⌤" U+2324
+ } else if (key == FL_Home) {
+ mac_key = NSHomeFunctionKey;
+ } else if (key == FL_End) {
+ mac_key = NSEndFunctionKey;
}
[self setKeyEquivalent:[NSString stringWithCharacters:&mac_key length:1]];
[self setKeyEquivalentModifierMask:mod];