From 9fe1e6e1d34af571b65faf3324a92bd2adac123f Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 5 Oct 2007 09:37:46 +0000 Subject: [PATCH] - Fix a bug with wrong handling of an ALT key pressed together with a mouse click. svn path=/trunk/; revision=29395 --- .../subsystems/win32/win32k/ntuser/input.c | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/reactos/subsystems/win32/win32k/ntuser/input.c b/reactos/subsystems/win32/win32k/ntuser/input.c index 92e16b813a9..60dea5b3a36 100644 --- a/reactos/subsystems/win32/win32k/ntuser/input.c +++ b/reactos/subsystems/win32/win32k/ntuser/input.c @@ -537,6 +537,7 @@ KeyboardThreadMain(PVOID StartContext) while (InputThreadsRunning) { BOOLEAN NumKeys = 1; + BOOLEAN bLeftAlt; KEYBOARD_INPUT_DATA KeyInput; KEYBOARD_INPUT_DATA NextKeyInput; LPARAM lParam = 0; @@ -608,6 +609,21 @@ KeyboardThreadMain(PVOID StartContext) * (For alt, the message that turns on accelerator * display, not sure what for win. Both TODO though.) */ + bLeftAlt = FALSE; + if(fsModifiers == MOD_ALT) + { + if(KeyInput.Flags & KEY_E1) + { + gQueueKeyStateTable[VK_RMENU] = 0x80; + } + else + { + gQueueKeyStateTable[VK_LMENU] = 0x80; + bLeftAlt = TRUE; + } + + gQueueKeyStateTable[VK_MENU] = 0x80; + } /* Read the next key before sending this one */ do @@ -650,7 +666,18 @@ KeyboardThreadMain(PVOID StartContext) if (fsModifiers == MOD_WIN) IntKeyboardSendWinKeyMsg(); else if (fsModifiers == MOD_ALT) + { + gQueueKeyStateTable[VK_MENU] = 0; + if(bLeftAlt) + { + gQueueKeyStateTable[VK_LMENU] = 0; + } + else + { + gQueueKeyStateTable[VK_RMENU] = 0; + } co_IntKeyboardSendAltKeyMsg(); + } continue; }