summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoakeymapper.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-06-28 16:13:52 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-06-30 12:58:33 +0200
commita5c6329829ba8565fb3fe5fd546e9d5f1a8fb71d (patch)
tree78759c49aace26d5eac1676f7f5ee04c23b4eccf /src/plugins/platforms/cocoa/qcocoakeymapper.mm
parent3021b1ecb7e1ec6e75e851c44f8ded9b8552235b (diff)
Pass correct modifier to QCocoaKeyMapper::toKeyCode()
The modifierKeyState variable is based on the Carbon modifiers, and then further mangled to match the expected format of UCKeyTranslate. But inside QCocoaKeyMapper::toKeyCode() we compare the modifiers to Qt::KeyboardModifiers. To ensure the logic works as expected we need to pass in the Qt modifiers. This fixes shortcut sequences based on "Backtab". Change-Id: I089fe601f0fe7a92f746e0a6447e2de0d974d0b2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoakeymapper.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoakeymapper.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoakeymapper.mm b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
index c326c1ca84..86143f275b 100644
--- a/src/plugins/platforms/cocoa/qcocoakeymapper.mm
+++ b/src/plugins/platforms/cocoa/qcocoakeymapper.mm
@@ -395,7 +395,7 @@ KeyboardLayoutItem *QCocoaKeyMapper::keyMapForKey(unsigned short macVirtualKey,
if (err == noErr && actualStringLength)
unicodeKey = QChar(unicodeString[0]);
- int qtkey = toKeyCode(unicodeKey, macVirtualKey, modifierKeyState);
+ int qtkey = toKeyCode(unicodeKey, macVirtualKey, qtModifiers);
if (qtkey == Qt::Key_unknown)
qtkey = unicodeKey.unicode();