Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2022-08-13 00:54:08 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2022-08-13 00:54:39 +0300
commitffd4f4a486c86fc69c14122372fef05263b572c3 (patch)
tree4414013f6ed35a416664495dbbc871233d553cd3 /intern
parentc1c0473a7efb5dc6455401799e3f3e8282aa31df (diff)
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`.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 5a930209376..7c07ea6cd64 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -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'\"':