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>bb10
parent
3021b1ecb7
commit
a5c6329829
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue