summaryrefslogtreecommitdiff
path: root/src/fl_shortcut.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-02-28 09:13:35 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-02-28 09:13:35 +0100
commitf4fb973c5d81928c76336827d2a7471715fc1323 (patch)
treeabca0b2c3b38817e4705a44292711ca9365e19cb /src/fl_shortcut.cxx
parentfa7fe3137268baaa1b4a37defc0916fec3865c7c (diff)
Simplify code to recognize GUI rescaling shortcuts
Diffstat (limited to 'src/fl_shortcut.cxx')
-rw-r--r--src/fl_shortcut.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx
index 92fc7e882..f5380be06 100644
--- a/src/fl_shortcut.cxx
+++ b/src/fl_shortcut.cxx
@@ -78,12 +78,10 @@ int Fl::test_shortcut(unsigned int shortcut) {
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;
+ // kludge to recognize shortcut FL_COMMAND+'+' without pressing SHIFT
+ if (shortcut == FL_COMMAND + '+' &&
+ (shift&(FL_META|FL_ALT|FL_CTRL|FL_SHIFT)) == FL_COMMAND &&
+ Fl::event_key() == '=') return 1;
return 0;
}