user32: Add support for the VK_APPS (Menu) key.
This commit is contained in:
parent
95f263240b
commit
6c73f7395b
|
@ -1660,6 +1660,12 @@ static BOOL process_keyboard_message( MSG *msg, UINT hw_id, HWND hwnd_filter,
|
|||
SendMessageW(msg->hwnd, WM_APPCOMMAND, (WPARAM)msg->hwnd, MAKELPARAM(0, (FAPPCOMMAND_KEY | (msg->wParam - VK_BROWSER_BACK + 1))));
|
||||
}
|
||||
}
|
||||
else if (msg->message == WM_KEYUP)
|
||||
{
|
||||
/* Handle VK_APPS key by posting a WM_CONTEXTMENU message */
|
||||
if (msg->wParam == VK_APPS && !MENU_IsMenuActive())
|
||||
PostMessageW(msg->hwnd, WM_CONTEXTMENU, (WPARAM)msg->hwnd, (LPARAM)-1);
|
||||
}
|
||||
}
|
||||
|
||||
if (HOOK_CallHooks( WH_KEYBOARD, remove ? HC_ACTION : HC_NOREMOVE,
|
||||
|
|
|
@ -5288,6 +5288,17 @@ static const struct message WmF1Seq[] = {
|
|||
{ WM_KEYUP, sent|wparam|lparam, VK_F1, 0xc0000001 },
|
||||
{ 0 }
|
||||
};
|
||||
static const struct message WmVkAppsSeq[] = {
|
||||
{ HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_APPS, 1 }, /* XP */
|
||||
{ WM_KEYDOWN, wparam|lparam, VK_APPS, 1 },
|
||||
{ WM_KEYDOWN, sent|wparam|lparam, VK_APPS, 0x00000001 },
|
||||
{ HCBT_KEYSKIPPED, hook|wparam|lparam|optional, VK_APPS, 0xc0000001 }, /* XP */
|
||||
{ WM_KEYUP, wparam|lparam, VK_APPS, 0xc0000001 },
|
||||
{ WM_KEYUP, sent|wparam|lparam, VK_APPS, 0xc0000001 },
|
||||
{ WM_CONTEXTMENU, lparam, /*hwnd*/0, (LPARAM)-1 },
|
||||
{ WM_CONTEXTMENU, sent|lparam, /*hwnd*/0, (LPARAM)-1 },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
static void pump_msg_loop(HWND hwnd, HACCEL hAccel)
|
||||
{
|
||||
|
@ -5495,11 +5506,18 @@ static void test_accelerators(void)
|
|||
pump_msg_loop(hwnd, 0);
|
||||
ok_sequence(WmAltMouseButton, "Alt+MouseButton press/release", FALSE);
|
||||
|
||||
trace("testing VK_F1 press/release\n");
|
||||
keybd_event(VK_F1, 0, 0, 0);
|
||||
keybd_event(VK_F1, 0, KEYEVENTF_KEYUP, 0);
|
||||
pump_msg_loop(hwnd, 0);
|
||||
ok_sequence(WmF1Seq, "F1 press/release", TRUE);
|
||||
|
||||
trace("testing VK_APPS press/release\n");
|
||||
keybd_event(VK_APPS, 0, 0, 0);
|
||||
keybd_event(VK_APPS, 0, KEYEVENTF_KEYUP, 0);
|
||||
pump_msg_loop(hwnd, 0);
|
||||
ok_sequence(WmVkAppsSeq, "VK_APPS press/release", FALSE);
|
||||
|
||||
DestroyWindow(hwnd);
|
||||
}
|
||||
|
||||
|
|
|
@ -1001,7 +1001,7 @@ static const WORD nonchar_key_vkey[256] =
|
|||
VK_DOWN, VK_PRIOR, VK_NEXT, VK_END,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, /* FF58 */
|
||||
/* misc keys */
|
||||
VK_SELECT, VK_SNAPSHOT, VK_EXECUTE, VK_INSERT, 0, 0, 0, 0, /* FF60 */
|
||||
VK_SELECT, VK_SNAPSHOT, VK_EXECUTE, VK_INSERT, 0,0,0, VK_APPS, /* FF60 */
|
||||
0, VK_CANCEL, VK_HELP, VK_CANCEL, 0, 0, 0, 0, /* FF68 */
|
||||
0, 0, 0, 0, 0, 0, 0, 0, /* FF70 */
|
||||
/* keypad keys */
|
||||
|
|
Loading…
Reference in New Issue