Cocoa integration: fix incorrect keyboard mapping
When switching between different input sources, we have to update layouts. Task-number: QTBUG-50865 Change-Id: I0c23c19b79a2102dcc533822b0f861c387582c6c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
28c831fa13
commit
0cae5a4c4b
@ -378,6 +378,10 @@ bool QCocoaKeyMapper::updateKeyboard()
|
||||
currentInputSource = source;
|
||||
keyboard_dead = 0;
|
||||
|
||||
const auto newMode = keyboard_mode;
|
||||
deleteLayouts();
|
||||
keyboard_mode = newMode;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -400,10 +404,8 @@ void QCocoaKeyMapper::clearMappings()
|
||||
|
||||
void QCocoaKeyMapper::updateKeyMap(unsigned short macVirtualKey, QChar unicodeKey)
|
||||
{
|
||||
if (updateKeyboard()) {
|
||||
// ### Qt 4 did this:
|
||||
// QKeyMapper::changeKeyboard();
|
||||
}
|
||||
updateKeyboard();
|
||||
|
||||
if (keyLayout[macVirtualKey])
|
||||
return;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user