Fix T100354: Home key being the grave accent in french keyboard layout
I'm still not sure how the `0xFF` value came about, but it's not a valid virtual key code. Therefore it should not be used in `MapVirtualKey`.
This commit is contained in:
parent
c1c0473a7e
commit
ffd4f4a486
Notes:
blender-bot
2023-02-14 06:55:40 +01:00
Referenced by issue #100888, shortcut problem Referenced by issue #100354, French-Canadian keyboard: Blender thinks the Home key is the grave accent (`) key.
|
@ -638,6 +638,11 @@ GHOST_TKey GHOST_SystemWin32::hardKey(RAWINPUT const &raw,
|
|||
GHOST_TKey GHOST_SystemWin32::processSpecialKey(short vKey, short scanCode) const
|
||||
{
|
||||
GHOST_TKey key = GHOST_kKeyUnknown;
|
||||
if (vKey == 0xFF) {
|
||||
/* 0xFF is not a valid virtual key code. */
|
||||
return key;
|
||||
}
|
||||
|
||||
char ch = (char)MapVirtualKeyA(vKey, MAPVK_VK_TO_CHAR);
|
||||
switch (ch) {
|
||||
case u'\"':
|
||||
|
|
Loading…
Reference in New Issue