summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWang Chuan <ouchuanm@outlook.com>2021-10-06 00:08:28 +0800
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-10-05 22:27:16 +0000
commit57e99441102f96dd0180a6ead84d8e8b3bd6b6f0 (patch)
treeeed5810e240e8e87fbef77f65c43547561dd1d93 /src
parent9b80b06ed43249c0b169f4258c44862f01f34929 (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 Change-Id: Ibb72f4b068cce735db8d76e5e0a1882aae115207 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 60caec953f76b1c63ff526c84cc968b5f83eabdf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-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 dbcab6c6d1..a9a27ebc8a 100644
--- a/src/plugins/platforms/cocoa/qnsview_keys.mm
+++ b/src/plugins/platforms/cocoa/qnsview_keys.mm
@@ -171,8 +171,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