FLTK logo

[master] 63a7942 - macOS: support 5 more keys as Fl_Sys_Menu_Bar item shortcuts.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 63a7942 - macOS: support 5 more keys as Fl_Sys_Menu_Bar item shortcuts. "ManoloFLTK" Oct 01, 2022  
 
commit 63a7942a6692ce1ec66746bd6fd3c16812125a48
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Sat Oct 1 13:28:52 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Sat Oct 1 13:28:52 2022 +0200

    macOS: support 5 more keys as Fl_Sys_Menu_Bar item shortcuts.

 src/Fl_MacOS_Sys_Menu_Bar.mm | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git src/Fl_MacOS_Sys_Menu_Bar.mm src/Fl_MacOS_Sys_Menu_Bar.mm
index d40bbbb..939a3a3 100644
--- src/Fl_MacOS_Sys_Menu_Bar.mm
+++ 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];
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.