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

This commit is contained in:
Vincent Povirk 2011-05-26 13:06:43 -05:00 committed by Alexandre Julliard
parent 03fbf37fe8
commit 58ae3a7fcc
1 changed files with 4 additions and 0 deletions

View File

@ -13076,6 +13076,7 @@ static void test_hotkey(void)
HWND test_window, taskbar_window;
BOOL ret;
MSG msg;
SHORT key_state;
SetLastError(0xdeadbeef);
ret = UnregisterHotKey(NULL, 0);
@ -13176,6 +13177,9 @@ static void test_hotkey(void)
}
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);
while (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, PM_REMOVE) ||
PeekMessage(&msg, NULL, WM_HOTKEY, WM_HOTKEY, PM_REMOVE))