[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
This commit is contained in:
Katayama Hirofumi MZ
2019-11-16 09:49:49 +09:00
committed by GitHub
parent 67c78d88c8
commit 462b1b7444

View File

@@ -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)
{