From: Katayama Hirofumi MZ Date: Sat, 16 Nov 2019 00:49:49 +0000 (+0900) Subject: [NTUSER] Support MK_SHIFT/MK_CONTROL of mouse messages (#2038) X-Git-Tag: 0.4.14-RC~1227 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=462b1b744496f13f1600ef9cd406027cbb134b36 [NTUSER] Support MK_SHIFT/MK_CONTROL of mouse messages (#2038) Upon mouse message generation, The states of Shift key and/or Ctrl key must be used. If Shift key is pressed, it enables MK_SHIFT flag of the mouse message. If Ctrl key is pressed, it enables MK_CONTROL flag of the mouse message. CORE-16279 --- diff --git a/win32ss/user/ntuser/mouse.c b/win32ss/user/ntuser/mouse.c index df8d7a6cc70..6d410681592 100644 --- a/win32ss/user/ntuser/mouse.c +++ b/win32ss/user/ntuser/mouse.c @@ -227,6 +227,16 @@ UserSendMouseInput(MOUSEINPUT *pmi, BOOL bInjected) UserSetCursorPos(ptCursor.x, ptCursor.y, bInjected, pmi->dwExtraInfo, TRUE); } + if (IS_KEY_DOWN(gafAsyncKeyState, VK_SHIFT)) + pCurInfo->ButtonsDown |= MK_SHIFT; + else + pCurInfo->ButtonsDown &= ~MK_SHIFT; + + if (IS_KEY_DOWN(gafAsyncKeyState, VK_CONTROL)) + pCurInfo->ButtonsDown |= MK_CONTROL; + else + pCurInfo->ButtonsDown &= ~MK_CONTROL; + /* Left button */ if (dwFlags & MOUSEEVENTF_LEFTDOWN) {