From 7e271686a79860a92ac4c63d666a400732aef038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 5 Oct 2020 14:21:51 +0200 Subject: [PATCH] Exclude all modifiers as candidates for shortcuts If we're going to limit shortcuts to non-modifiers, we should at least include all of the modifiers, otherwise we'll end up passing through e.g. Key_CapsLock. Change-Id: If11758f85d06f75e9b9c2d2a57d4a4915ff72317 Reviewed-by: Andy Shaw --- src/gui/kernel/qshortcutmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp index e79aaacd1a..7fabfc5f54 100644 --- a/src/gui/kernel/qshortcutmap.cpp +++ b/src/gui/kernel/qshortcutmap.cpp @@ -359,7 +359,7 @@ QKeySequence::SequenceMatch QShortcutMap::nextState(QKeyEvent *e) Q_D(QShortcutMap); // Modifiers can NOT be shortcuts... if (e->key() >= Qt::Key_Shift && - e->key() <= Qt::Key_Alt) + e->key() <= Qt::Key_ScrollLock) return d->currentState; QKeySequence::SequenceMatch result = QKeySequence::NoMatch;