summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorWang Chuan <ouchuanm@outlook.com>2021-10-06 00:08:28 +0800
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-10-05 20:28:41 +0000
commit60caec953f76b1c63ff526c84cc968b5f83eabdf (patch)
tree86b8aa4a36cff6e149ca2e663196fa41f356e940 /src/plugins
parent906cb8d4ef4514c8eeb63d683ef1bb1b870407a0 (diff)
macOS: Ensure cancelOperation is sent as regular key event
Since 9e1875483ceaf907226f84cd6a58ab59f7f16f80 the logic of sending QKeyEvent was changed to only happen when we explicitly decided to not treat input as complex text, or when a selector for a command was not found. This missed the case where we handle cancelOperation by falling back to sending a regular key event. We now set m_sendKeyEvent to true to trigger this logic. Fixes: QTBUG-97119 Pick-to: 6.2 Change-Id: Ibb72f4b068cce735db8d76e5e0a1882aae115207 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qnsview_keys.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview_keys.mm b/src/plugins/platforms/cocoa/qnsview_keys.mm
index d6e0c4b012..2edbf67b6f 100644
--- a/src/plugins/platforms/cocoa/qnsview_keys.mm
+++ b/src/plugins/platforms/cocoa/qnsview_keys.mm
@@ -165,8 +165,10 @@
// Handling the key event may recurse back here through interpretKeyEvents
// (when IM is enabled), so we need to guard against that.
- if (currentEvent == m_currentlyInterpretedKeyEvent)
+ if (currentEvent == m_currentlyInterpretedKeyEvent) {
+ m_sendKeyEvent = true;
return;
+ }
// Send Command+Key_Period and Escape as normal keypresses so that
// the key sequence is delivered through Qt. That way clients can