Commit 58ae3a7f authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

user32/tests: Add test showing hotkeys change the async key state.

parent 03fbf37f
...@@ -13076,6 +13076,7 @@ static void test_hotkey(void) ...@@ -13076,6 +13076,7 @@ static void test_hotkey(void)
HWND test_window, taskbar_window; HWND test_window, taskbar_window;
BOOL ret; BOOL ret;
MSG msg; MSG msg;
SHORT key_state;
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = UnregisterHotKey(NULL, 0); ret = UnregisterHotKey(NULL, 0);
...@@ -13176,6 +13177,9 @@ static void test_hotkey(void) ...@@ -13176,6 +13177,9 @@ static void test_hotkey(void)
} }
ok_sequence(WmHotkeyPress, "window hotkey press", FALSE); ok_sequence(WmHotkeyPress, "window hotkey press", FALSE);
key_state = GetAsyncKeyState(hotkey_letter);
ok((key_state & 0x8000) == 0x8000, "unexpected key state %x\n", key_state);
keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0); keybd_event(hotkey_letter, 0, KEYEVENTF_KEYUP, 0);
while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) || while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) ||
PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE)) PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment