To:
[email protected]
Subject: Patch 5.4n.16
Fcc: outbox
From: Bram Moolenaar <
[email protected]>
------------
Patch 5.4n.16
Problem: Win32 GUI: The <F10> key both selected the menu and was handled as
a key hit.
Solution: Apply 'winaltkeys' to <F10>, like it is used for Alt keys.
Files: src/gui_w32.c
*** ../vim-5.4n/src/gui_w32.c Sun Jul 4 20:35:52 1999
--- src/gui_w32.c Wed Jul 7 20:19:06 1999
***************
*** 3559,3565 ****
process_message(void)
{
MSG msg;
! UINT vk; /* Virtual key */
char_u string[3];
int i;
int modifiers = 0;
--- 3559,3565 ----
process_message(void)
{
MSG msg;
! UINT vk = 0; /* Virtual key */
char_u string[3];
int i;
int modifiers = 0;
***************
*** 3635,3640 ****
--- 3635,3649 ----
if (special_keys[i].key_sym == vk
&& (vk != VK_SPACE || !(GetKeyState(VK_MENU) & 0x8000)))
{
+ #ifdef WANT_MENU
+ /* Check for <F10>: Windows selects the menu. Ignore it when
+ * 'winaltkeys' is "yes" or "menu" */
+ if (vk == VK_F10
+ && gui.menu_is_active
+ && (*p_wak == 'y' || *p_wak == 'm'))
+ break;
+ #endif
+
if (GetKeyState(VK_SHIFT) & 0x8000)
modifiers |= MOD_MASK_SHIFT;
/*
***************
*** 3721,3727 ****
if (msg.message == WM_IME_NOTIFY)
ImeNotify(msg.wParam, msg.lParam);
#endif
! DispatchMessage(&msg);
}
/*
--- 3730,3741 ----
if (msg.message == WM_IME_NOTIFY)
ImeNotify(msg.wParam, msg.lParam);
#endif
! #ifdef WANT_MENU
! /* Check for <F10>: Windows selects the menu. Don't let Windows handle it
! * when 'winaltkeys' is "no" */
! if (vk != VK_F10 || *p_wak != 'n')
! #endif
! DispatchMessage(&msg);
}
/*
--
ERIC IDLE PLAYED: THE DEAD COLLECTOR, MR BINT (A VILLAGE NE'ER-DO -WELL VERY
KEEN ON BURNING WITCHES), SIR ROBIN, THE GUARD WHO DOESN'T
HICOUGH BUT TRIES TO GET THINGS STRAIGHT, CONCORDE (SIR
LAUNCELOT'S TRUSTY STEED), ROGER THE SHRUBBER (A SHRUBBER),
BROTHER MAYNARD
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
--/-/---- Bram Moolenaar ----
[email protected] ----
[email protected] ---\-\--
\ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /