user32: Properly translate keyboard left/right-shift, alt, ctrl keys hardware messages.

This commit is contained in:
Vitaliy Margolen 2008-03-29 10:11:24 -06:00 committed by Alexandre Julliard
parent bae4ebb7d7
commit a28b86a78e
1 changed files with 15 additions and 0 deletions

View File

@ -1683,6 +1683,21 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
{
EVENTMSG event;
if (msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN ||
msg->message == WM_KEYUP || msg->message == WM_SYSKEYUP)
switch (msg->wParam)
{
case VK_LSHIFT: case VK_RSHIFT:
msg->wParam = VK_SHIFT;
break;
case VK_LCONTROL: case VK_RCONTROL:
msg->wParam = VK_CONTROL;
break;
case VK_LMENU: case VK_RMENU:
msg->wParam = VK_MENU;
break;
}
/* FIXME: is this really the right place for this hook? */
event.message = msg->message;
event.hwnd = msg->hwnd;