https://git.reactos.org/?p=reactos.git;a=commitdiff;h=462b1b744496f13f1600e…
commit 462b1b744496f13f1600ef9cd406027cbb134b36
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sat Nov 16 09:49:49 2019 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sat Nov 16 09:49:49 2019 +0900
[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
---
win32ss/user/ntuser/mouse.c | 10 ++++++++++
1 file changed, 10 insertions(+)
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)
{