summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/render_widget_host_view_qt.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 2d42dc11c..8bbf6d3d7 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -1008,8 +1008,11 @@ bool RenderWidgetHostViewQt::forwardEvent(QEvent *event)
auto acceptKeyOutOfInputField = [](QKeyEvent *keyEvent) -> bool {
#ifdef Q_OS_MACOS
- // Try triggering a registered shortcut
- if (QGuiApplicationPrivate::instance()->shortcutMap.tryShortcut(keyEvent))
+ // Check if a shortcut is registered for this key sequence.
+ QKeySequence sequence = QKeySequence (
+ (keyEvent->modifiers() | keyEvent->key()) &
+ ~(Qt::KeypadModifier | Qt::GroupSwitchModifier));
+ if (QGuiApplicationPrivate::instance()->shortcutMap.hasShortcutForKeySequence(sequence))
return false;
// The following shortcuts are handled out of input field too but