Commit 56989b6e authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

winex11: Use constants instead of magic numbers in GetKeyNameText.

parent 964687d7
......@@ -2158,8 +2158,7 @@ INT X11DRV_GetKeyNameText(LONG lParam, LPWSTR lpBuffer, INT nSize)
scanCode = lParam >> 16;
scanCode &= 0x1ff; /* keep "extended-key" flag with code */
/* FIXME: should use MVK type 3 (NT version that distinguishes right and left */
vkey = X11DRV_MapVirtualKeyEx(scanCode, 1, X11DRV_GetKeyboardLayout(0));
vkey = X11DRV_MapVirtualKeyEx(scanCode, MAPVK_VSC_TO_VK_EX, X11DRV_GetKeyboardLayout(0));
/* handle "don't care" bit (0x02000000) */
if (!(lParam & 0x02000000)) {
......@@ -2181,7 +2180,7 @@ INT X11DRV_GetKeyNameText(LONG lParam, LPWSTR lpBuffer, INT nSize)
}
}
ansi = X11DRV_MapVirtualKeyEx(vkey, 2, X11DRV_GetKeyboardLayout(0));
ansi = X11DRV_MapVirtualKeyEx(vkey, MAPVK_VK_TO_CHAR, X11DRV_GetKeyboardLayout(0));
TRACE("scan 0x%04x, vkey 0x%04x, ANSI 0x%04x\n", scanCode, vkey, ansi);
/* first get the name of the "regular" keys which is the Upper case
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment