Hi, This is a small patch to make sure that the HIBYTE of wVk is masked so that 1) memory outside of the key_state_table isn't referenced and 2) Wine behavior better reflects Windows. This problem came up in an application that passed the result of VkKeyScan() (which sets some high bits of the word) as a virtual key to SendInput(). Thanks, Thomas Kho 2006-04-19 Thomas Kho * dlls/x11drv/keyboard.c: x11drv: virtual key input scrubbing in X11DRV_send_keyboard_input keyboard.c | 2 ++ 1 file changed, 2 insertions(+) Signed-off-by: Thomas Kho Index: dlls/x11drv/keyboard.c =================================================================== RCS file: /home/wine/wine/dlls/x11drv/keyboard.c,v retrieving revision 1.89 diff -u -r1.89 keyboard.c --- dlls/x11drv/keyboard.c 14 Apr 2006 17:47:24 -0000 1.89 +++ dlls/x11drv/keyboard.c 19 Apr 2006 18:46:12 -0000 @@ -1115,6 +1115,8 @@ KBDLLHOOKSTRUCT hook; WORD wVkStripped; + wVk = LOBYTE(wVk); + /* strip left/right for menu, control, shift */ if (wVk == VK_LMENU || wVk == VK_RMENU) wVkStripped = VK_MENU;