diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c index b2f25228f00..917cc2e2d3b 100644 --- a/dlls/winex11.drv/keyboard.c +++ b/dlls/winex11.drv/keyboard.c @@ -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