Win: If the combined key is unknown then fall back to the original key pressed
When pressing a combination of keys it is possible that it ends up being seen as a Key_unknown and as a result it can give strange results when used. Therefore if the key is Key_unknown in that case then it should fallback to the unmodified key. For example on a French keyboard, this means it will correctly allow CTRL+< as a shortcut instead of showing it as CTRL+\. Task-number: QTBUG-58304 Change-Id: Iae4c11a1e6e2d4343134ed1e3f9049b6df2613af Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
9c9edaa6f5
commit
c6ecbd4762
@ -970,7 +970,8 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms
|
||||
state = state ^ Qt::ShiftModifier;
|
||||
else if (code == Qt::Key_Alt)
|
||||
state = state ^ Qt::AltModifier;
|
||||
|
||||
else if (code == 0 && modifiersIndex != 0)
|
||||
code = keyLayout[vk_key].qtKey[0];
|
||||
// If the bit 24 of lParm is set you received a enter,
|
||||
// otherwise a Return. (This is the extended key bit)
|
||||
if ((code == Qt::Key_Return) && (msg.lParam & 0x1000000))
|
||||
|
Loading…
Reference in New Issue
Block a user