Reputation: 831
What I want to achieve is as follows:
Disable ALT
to show menu bar by toggle-menu-bar
completely.
-> Potentially map ALT
to a NULL
action?
Use a different shortcut to toggle-menu-bar
.
Is there a way to achieve this?
Upvotes: 67
Views: 17606
Reputation: 1
open setting from File --> Preferences --> Settings
and in searchBox
type menu bar
in Result you can turn off it and whatever you want to doenter image description here
Upvotes: 0
Reputation: 156
As in Dmitriy Botov answer, adding those lines
"window.customMenuBarAltFocus": false,
"window.enableMenuBarMnemonics": false,
"window.menuBarVisibility": "hidden",
to the config works, but when I toggle the menu bar with e.g. alt+f the menu stays open.
If I use the toggle menu bar command/keybind the setting of "window.menuBarVisibility": "hidden"
will be changed to "window.menuBarVisibility": "classic"
and then to "window.menuBarVisibility": "toggle"
which enables showing the menu bar on alt key again.
However, I'm using the Settings Cycler extension and build a command with it that does the job for me:
1. in settings.json
add:
"settings.cycle": [{
"id": "toggleMenuBar",
"values":[
{ "window.menuBarVisibility": "hidden" },
{ "window.menuBarVisibility": "visible" }
]
}
],
2. Set a keybind for the new command:
{
"key": "alt+shift+w",
"command": "settings.cycle.toggleMenuBar",
}
This shows the menu bar and removes the "toggle on alt key" functionality when hidden.
Tested on vscode 1.60.0
Upvotes: 1
Reputation: 153
I have tried this on Win10, and adding these 3 lines to settings.json
will work for me, while the latest upvoted answer will make the Menu bar hidden, which is not what we want.
"window.titleBarStyle": "custom",
"window.customMenuBarAltFocus": false,
"window.enableMenuBarMnemonics": false,
Upvotes: 13
Reputation: 18386
On Ubuntu I needed this two settings in settings.json
:
"window.titleBarStyle": "custom",
"window.customMenuBarAltFocus": false
(VS Code restart might be required)
Related:
Upvotes: 102
Reputation: 2651
The solution is to set menu always hidden to prevent interfering with alt-hotkeys. But enabling mnemonics still allows you to reveal it by pressing Alt+F for example.
This can be achieved with "window.menuBarVisibility": "hidden", "window.enableMenuBarMnemonics": true in settings.json. The enableMenuBarMnemonics seem to be the default and hence unnecssary.
To access menu, press Alt-F or Alt-E, or Alt-whatever
This answer originates from Dmitriy Botov's answer
and my comment on it
Upvotes: 5
Reputation: 189
This fixed it for me (I'm using Linux)
"window.titleBarStyle": "custom"
Upvotes: 5
Reputation: 2651
My only solution is to set menu always hidden to prevent interfering with alt-hotkeys. But enabling mnemonics still allows you to reveal it by pressing Alt+F for example.
Upvotes: 35
Reputation: 583
I'm using v1.25.1 and the setting to disable ALT menu selection is "window.enableMenuBarMnemonics": false
. You can keep the menu visible.
Upvotes: 6