Convert keyboard key names to utf-8

Günther Brammer 2011-09-28 01:12:45 +02:00
parent 8941abb4f4
commit 2fcdd4d929
1 changed files with 8 additions and 8 deletions

View File

@ -55,11 +55,11 @@ namespace
if (result == "unknown key")
result = FormatString("\\x%x", (DWORD) k).getData();
// some special cases
if (result == "world 0") result = "´";
if (result == "world 1") result = "ß";
if (result == "world 2") result = "Ü";
if (result == "world 3") result = "Ä";
if (result == "world 4") result = "Ö";
if (result == "world 0") result = "´";
if (result == "world 1") result = "ß";
if (result == "world 2") result = "Ü";
if (result == "world 3") result = "Ä";
if (result == "world 4") result = "Ö";
// capitalize first letter
result[0] = toupper(result[0]);
// return key name
@ -278,17 +278,17 @@ const C4KeyCodeMapEntry KeyCodeMap [] =
{ VK_LAUNCH_APP1 , "LAUNCH_APP1" , NULL },
{ VK_LAUNCH_APP2 , "LAUNCH_APP2" , NULL },
{ VK_OEM_1 , "OEM Ü" , "Ü" }, // German hax
{ VK_OEM_1 , "OEM Ü" , "Ü" }, // German hax
{ VK_OEM_PLUS , "OEM +" , "+" },
{ VK_OEM_COMMA , "OEM ," , "," },
{ VK_OEM_MINUS , "OEM -" , "-" },
{ VK_OEM_PERIOD , "OEM ." , "." },
{ VK_OEM_2 , "OEM 2" , "2" },
{ VK_OEM_3 , "OEM Ö" , "Ö" }, // German hax
{ VK_OEM_3 , "OEM Ö" , "Ö" }, // German hax
{ VK_OEM_4 , "OEM 4" , "4" },
{ VK_OEM_5 , "OEM 5" , "5" },
{ VK_OEM_6 , "OEM 6" , "6" },
{ VK_OEM_7 , "OEM Ä" , "Ä" }, // German hax
{ VK_OEM_7 , "OEM Ä" , "Ä" }, // German hax
{ VK_OEM_8 , "OEM 8" , "8" },
{ VK_OEM_AX , "AX" , "AX" },
{ VK_OEM_102 , "< > |" , "<" }, // German hax