Commit b74c0cc2 authored by Erich Hoover's avatar Erich Hoover Committed by Alexandre Julliard

user32: Test for 'F10' key events.

parent e80144c4
......@@ -6870,6 +6870,36 @@ static const struct message WmVkAppsSeq[] = {
{ WM_CONTEXTMENU, sent|lparam, /*hwnd*/0, (LPARAM)-1 },
{ 0 }
};
static const struct message WmVkF10Seq[] = {
{ HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 1 }, /* XP */
{ WM_SYSKEYDOWN, wparam|lparam, VK_F10, 1 },
{ WM_SYSKEYDOWN, sent|wparam|lparam, VK_F10, 0x00000001 },
{ HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0xc0000001 }, /* XP */
{ WM_SYSKEYUP, wparam|lparam, VK_F10, 0xc0000001 },
{ WM_SYSKEYUP, sent|wparam|lparam, VK_F10, 0xc0000001 },
{ WM_SYSCOMMAND, sent|defwinproc|wparam, SC_KEYMENU },
{ HCBT_SYSCOMMAND, hook },
{ WM_ENTERMENULOOP, sent|defwinproc|wparam|lparam, 0, 0 },
{ EVENT_SYSTEM_CAPTURESTART, winevent_hook|wparam|lparam, 0, 0 },
{ WM_INITMENU, sent|defwinproc },
{ EVENT_SYSTEM_MENUSTART, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 },
{ WM_MENUSELECT, sent|defwinproc|wparam, MAKEWPARAM(0,MF_SYSMENU|MF_POPUP|MF_HILITE) },
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 1 },
{ HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0x10000001 }, /* XP */
{ HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 1 }, /* XP */
{ EVENT_OBJECT_FOCUS, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 },
{ EVENT_SYSTEM_CAPTUREEND, winevent_hook|wparam|lparam, 0, 0, },
{ WM_CAPTURECHANGED, sent|defwinproc },
{ WM_MENUSELECT, sent|defwinproc|wparam|optional, MAKEWPARAM(0,0xffff) },
{ EVENT_SYSTEM_MENUEND, winevent_hook|wparam|lparam, OBJID_SYSMENU, 0 },
{ WM_EXITMENULOOP, sent|defwinproc },
{ HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_F10, 0xc0000001 }, /* XP */
{ WM_SYSKEYUP, wparam|lparam, VK_F10, 0xc0000001 },
{ WM_SYSKEYUP, sent|wparam|lparam, VK_F10, 0xc0000001 },
{ 0 }
};
static void pump_msg_loop(HWND hwnd, HACCEL hAccel)
{
......@@ -7082,6 +7112,14 @@ static void test_accelerators(void)
pump_msg_loop(hwnd, 0);
ok_sequence(WmVkAppsSeq, "VK_APPS press/release", FALSE);
trace("testing VK_F10 press/release\n");
keybd_event(VK_F10, 0, 0, 0);
keybd_event(VK_F10, 0, KEYEVENTF_KEYUP, 0);
keybd_event(VK_F10, 0, 0, 0);
keybd_event(VK_F10, 0, KEYEVENTF_KEYUP, 0);
pump_msg_loop(hwnd, 0);
ok_sequence(WmVkF10Seq, "VK_F10 press/release", TRUE);
trace("testing Shift+MouseButton press/release\n");
/* first, move mouse pointer inside of the window client area */
GetClientRect(hwnd, &rc);
......
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