Detect ALT key for mouse events on Windows

This commit is contained in:
Michael Bikovitsky authored and Wez Furlong committed 2023-02-04 06:37:13 -08:00
1 parent 1415c5607e
commit 397f1d0dc9
1 file changed
+3
+3
View File
@@ -1428,6 +1428,9 @@ fn mods_and_buttons(wparam: WPARAM) -> (Modifiers, MouseButtons) {
if wparam & MK_SHIFT != 0 {
modifiers |= Modifiers::SHIFT;
}
if unsafe { GetKeyState(VK_MENU) } as u16 & 0x8000 != 0 {
modifiers |= Modifiers::ALT;
}
if wparam & MK_LBUTTON != 0 {
buttons |= MouseButtons::LEFT;
}