10#define msg_hotkey(msg, id, mod, vk) do \
12 ok((msg)->message == WM_HOTKEY, "Unexpected message %u\n", (msg)->message); \
13 ok((msg)->hwnd == NULL, "hwnd = %p\n", (msg)->hwnd); \
14 ok((msg)->wParam == (id), "wParam = 0x%Ix\n", (msg)->wParam); \
15 ok((msg)->lParam == MAKELONG(mod, vk), \
16 "wParam = 0x%Ix, expected 0x%lx\n", (msg)->lParam, MAKELONG(mod, vk)); \
18#define expect_hotkey(id, mod, vk) do \
21 int hotkey_count = 0; \
22 while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) \
24 msg_hotkey(&msg, id, mod, vk); \
25 if (msg.message == WM_HOTKEY) hotkey_count++; \
26 DispatchMessageW(&msg); \
28 ok(hotkey_count == 1, "Received %d WM_HOTKEY messages, expected 1\n", hotkey_count); \
30#define msg_no_hotkey(msg) do \
32 if ((msg)->message == WM_HOTKEY) \
33 ok((msg)->message != WM_HOTKEY, \
34 "Got WM_HOTKEY with hwnd=%p, wParam=0x%Ix, lParam=0x%Ix\n", \
35 (msg)->hwnd, (msg)->wParam, (msg)->lParam); \
38 "Unexpected message %u posted to thread with hwnd=%p, wParam=0x%Ix, lParam=0x%Ix\n", \
39 (msg)->message, (msg)->hwnd, (msg)->wParam, (msg)->lParam); \
41#define expect_no_hotkey() do \
44 while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) \
46 msg_no_hotkey(&msg); \
47 DispatchMessageW(&msg); \
78 trace(
"Ctrl+U (with Ctrl up first)\n");
88 trace(
"Ctrl+U (with U down first and Ctrl up first)\n");
98 trace(
"Ctrl+U (with U down first and U up first)\n");
118 trace(
"Ctrl+Alt (with Ctrl up first)\n");
138 trace(
"Alt+Ctrl (with Alt up first)\n");
158 trace(
"Ctrl+Alt+U\n");
172 trace(
"Alt+Ctrl+U\n");
186 trace(
"Ctrl+U+Alt\n");
200 trace(
"Alt+U+Ctrl\n");
#define expect_hotkey(id, mod, vk)
#define expect_no_hotkey()
BOOL WINAPI UnregisterHotKey(_In_opt_ HWND, _In_ int)
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
BOOL WINAPI RegisterHotKey(_In_opt_ HWND, _In_ int, _In_ UINT, _In_ UINT)
VOID WINAPI keybd_event(_In_ BYTE, _In_ BYTE, _In_ DWORD, _In_ ULONG_PTR)