summaryrefslogtreecommitdiff
path: root/src/fl_shortcut.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-02-26 10:46:28 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-02-26 10:46:28 +0100
commit2ea52918214dd83932d8bf30f2a073e08ca563f0 (patch)
treefa49928c99165fd08d36aedee378c426ac812653 /src/fl_shortcut.cxx
parent77c726c79c623e036fb40e7e1c6973f058b35abc (diff)
Allow FL_COMMAND+'+' and FL_CTRL+'0' as menu shortcuts
Diffstat (limited to 'src/fl_shortcut.cxx')
-rw-r--r--src/fl_shortcut.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx
index 014fd2637..92fc7e882 100644
--- a/src/fl_shortcut.cxx
+++ b/src/fl_shortcut.cxx
@@ -77,6 +77,13 @@ int Fl::test_shortcut(unsigned int shortcut) {
// kludge so that Ctrl+'_' works (as opposed to Ctrl+'^_'):
if ((shift&FL_CTRL) && key >= 0x3f && key <= 0x5F
&& firstChar==(key^0x40)) return 1; // firstChar should be within a-z
+
+ // kludge to recognize shortcut FL_COMMAND+'+'
+ if (shift == FL_COMMAND && Fl::event_key() == '=' &&
+ shortcut == FL_COMMAND + '+') return 1;
+ // kludge to recognize shortcut FL_CTRL+'0' with Fr keyboard
+ if (shift == FL_CTRL && !strcmp(Fl::event_text(), "à") &&
+ shortcut == FL_CTRL + '0') return 1;
return 0;
}