From 2ea52918214dd83932d8bf30f2a073e08ca563f0 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 26 Feb 2024 10:46:28 +0100 Subject: Allow FL_COMMAND+'+' and FL_CTRL+'0' as menu shortcuts --- src/fl_shortcut.cxx | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- cgit v1.2.3