diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-07-26 19:01:41 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-07-26 19:01:41 +0200 |
| commit | f582e06224f178a73b25bd241933c4f50ff36279 (patch) | |
| tree | fc04641344c04d67296c63fc5e7da0576244004d /src | |
| parent | 2241bab478aa0ee632de99598be50a53c78f56b3 (diff) | |
Fl_Sys_Menu_Bar: allow use of escape and tab as menu shortcuts.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_MacOS_Sys_Menu_Bar.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Fl_MacOS_Sys_Menu_Bar.mm b/src/Fl_MacOS_Sys_Menu_Bar.mm index 57833511e..314e6e44e 100644 --- a/src/Fl_MacOS_Sys_Menu_Bar.mm +++ b/src/Fl_MacOS_Sys_Menu_Bar.mm @@ -177,7 +177,11 @@ const char *Fl_Mac_App_Menu::quit = "Quit %@"; if ( (key >= (FL_F+1)) && (key <= FL_F_Last) ) { // Handle function keys int fkey_num = (key - FL_F); // 1,2.. mac_key = NSF1FunctionKey + fkey_num - 1; - } + } else if (key == FL_Escape) { + mac_key = 27; + } else if (key == FL_Tab) { + mac_key = 9; + } [self setKeyEquivalent:[NSString stringWithCharacters:&mac_key length:1]]; [self setKeyEquivalentModifierMask:mod]; } |
