it applies tOn Fri, Apr 23, 2021 at 12:31 AM cjsmall
You didn't say which GUI you are using (I'm using GTK3); also, Vim 8.1
is getting a little long in the teeth IYSWIM. Vim 8.2 was released on
12 December 2019 and its latest patchlevel is 8.2.2800. It is
conceivable that one of these two thousand eight hundred patches fixes
your problem; but otherwise, see below.
I'm on openSUSE 15.2 and here, hitting Alt-F10 on a virtual desktop
unmaximizes the top window, no matter which one — it applies to my
browser as well as to gvim. Repeating the action reverses the process.
The Alt-F10 combo doesn't even reach gvim here. OTOH Alt+letter
triggers (in gvim with GTK3 GUI) the menus on the menubar: Alt-F is
File, Alt-E is Edit, Alt-T is Tools, etc. IIUC this behaviour depends
on the 'winaltkeys' settings.
See :help 'winaltkeys'
If you don't want the GUI menus at all, you can disable them by
removing the m flag from the 'guioptions' setting; OTOH, even without
the menus-on-top there is still a separate ways to get the same menus
at the bottom in both gvim and Vim, see
https://vim.fandom.com/wiki/Text_mode_menus
In my experience, the most portable {lhs} key assignments for mappings
are F2 to F9 and F10 to F12 in both Vim and gvim, and in addition
Shift-F1 to Shift-F12 in gvim. F1 is reserved for Help. F10 may either
be the system menu, or it may be available too. Others might or might
not work for reasons external to Vim.
If when you do
:verbose map <M-F10>
in gvim, the answer is either "No mapping found" or your own defined
mapping, then if gvim does something else when you hit that key combo,
the reason is to be found outside of Vim. Maybe in the settings of
your window manager, if you can get at them. Otherwise, if you still
have some not yet taken mappable key (maybe a non-ASCII key like the
³² and £µ keys present on my keyboard), try moving whatevr you have on
Alt-F10 to some such key.
Best regards,
Tony.