Windows: Check if the fallback key matches the shift modifier case too
There are some keyboard layouts where pressing shift will give something different to what the expected key would be. For example, on a French keyboard layout, pressing SHIFT+! gives 1 as opposed to SHIFT+1 giving ! on a US keyboard layout. Therefore it should check against both cases to ensure it does not end up adding a new entry. Task-number: QTBUG-57938 Change-Id: I11c52619c048b98500f2d79876bb912720af6e65 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
parent
22138f5907
commit
64666b9ee0
@ -703,7 +703,8 @@ void QWindowsKeyMapper::updatePossibleKeyCodes(unsigned char *kbdBuffer, quint32
|
||||
quint32 fallbackKey = winceKeyBend(vk_key);
|
||||
if (!fallbackKey || fallbackKey == Qt::Key_unknown) {
|
||||
fallbackKey = 0;
|
||||
if (vk_key != keyLayout[vk_key].qtKey[0] && vk_key < 0x5B && vk_key > 0x2F)
|
||||
if (vk_key != keyLayout[vk_key].qtKey[0] && vk_key != keyLayout[vk_key].qtKey[1]
|
||||
&& vk_key < 0x5B && vk_key > 0x2F)
|
||||
fallbackKey = vk_key;
|
||||
}
|
||||
keyLayout[vk_key].qtKey[8] = fallbackKey;
|
||||
|
Loading…
x
Reference in New Issue
Block a user