FLTK logo

[master] 63dcdce - macOS: support FL_Up,FL_Down,FL_Left,FL_Right system menu 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] 63dcdce - macOS: support FL_Up,FL_Down,FL_Left,FL_Right system menu item shortcuts "ManoloFLTK" Sep 29, 2022  
 
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 ]
 
     
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'.