Vscode: `alt+shift` toggles `window.menuBarVisibility` even when the menu bar is disabled

Created on 22 Nov 2019  ·  11Comments  ·  Source: microsoft/vscode


I'd like to completely disable the menu bar - both hide it & have 0 keybindings to activate/toggle it.

I am unable to do this because the key combination alt + shift still activates the menu bar (see "Steps to Reproduce").

$ vscodium --version
1.40.0
86405ea23e3937316009fc27c9361deee66ffbf5
x64
$ uname -a
Linux arch-usb 5.3.11-arch1-1 #1 SMP PREEMPT Tue, 12 Nov 2019 22:19:48 +0000 x86_64 GNU/Linux

Steps to Reproduce:

  1. Set the following settings @ settings.json:
    "window.customMenuBarAltFocus": false,
    "window.enableMenuBarMnemonics": false,
    "window.menuBarVisibility": "hidden"
  1. Make sure the menu bar is hidden

(if you toggle it via F1, the setting window.menuBarVisibility will get changed to default and then to toggle - double-check yourself that it's set to hidden after hiding it)

  1. alt now does NOT open the menu bar. Great. Now try with alt + shift... The menu bar comes back 😒


Reproduces without extensions: Yes

See also:

https://github.com/microsoft/vscode/issues/66116
https://github.com/Microsoft/vscode/issues/63325

the solution from these issues is to set the window.enableMenuBarMnemonics to false, but it does not help in my case.


From the keyboard shortcuts menu, the command workbench.action.toggleMenuBar does not have any key bindings assigned to it, and I'm unable to unbind it (though the first 2 options from step 1 should get rid of the binding anyway).


P.S.

I'd love to set the "window.menuBarVisibility" to compact, but, as mentioned in the Default Settings, it's ignored when window.titleBarStyle is native.

(// - compact: Menu is displayed as a compact button in the sidebar. This value is ignored when 'window.titleBarStyle' is 'native'.)

is there a specific reason for this?
Couldn't one fit the compact button for the menu bar inside the Activity Bar, just like the Explorer, Search, Source Control & custom bars for extensions, without requiring the window.titleBarStyle to be custom instead of native?

This would also allow the user to re-order it etc.
And I highly prefer the compact version of the menu bar - it's great!


For me on arch linux + i3gaps, the custom instead of native mode sucks - it takes up way more space rather than the menu bar would itself:

pls-fix


Thank you very much - lemme know if I can help with anything else.

confirmed electron electron-6-update linux menus upstream-issue-linked

Most helpful comment

Thanks very much for all the great work on VSCode, which I love.

I'm finding this regression highly vexatious because it happens a high fraction of the times I do a multi-cursor operation (which I do very frequently) and causes focus to be lost, requiring me to alt-tab to another window and back. This substantially interrupts my flow.

A fix would be very much appreciated. Thanks. In the meantime, I think I'll downgrade to 1.39.

All 11 comments

Here maybe possible workaround https://github.com/electron/electron/issues/11106#issuecomment-441350115

Also downgrading from 1.40 to 1.39 helps too. What is changed on 1.40 release for menu implementation?

@deepak1556 this is not only upstream-issue-linked, this is regression of VS Code, because on 1.39 all works well. Can you please lookup what is changed with menu implementation in 1.40?

Thanks very much for all the great work on VSCode, which I love.

I'm finding this regression highly vexatious because it happens a high fraction of the times I do a multi-cursor operation (which I do very frequently) and causes focus to be lost, requiring me to alt-tab to another window and back. This substantially interrupts my flow.

A fix would be very much appreciated. Thanks. In the meantime, I think I'll downgrade to 1.39.

Can anybody post download links to VS Code 1.39 version packages?

Previous versions are available on, eg, https://code.visualstudio.com/updates/v1_39.

I used https://update.code.visualstudio.com/1.39.2/linux-deb-x64/stable. I prevent it from updating to latest again with sudo apt-mark hold code.

After investigating I see that workaround, described in https://github.com/electron/electron/issues/11106#issuecomment-441350115 is not work, so Electron 6.0 release produce new regression, and I post separate issue about this: https://github.com/electron/electron/issues/22213

Hope that it will be fixed quicker in separate thread!

Ubuntu 18.04 + KDE not working even on 1.39.2. "Alt+Shift" still focus menu despite all recommendations :(
UPD: Finally found workaround on latest (1.47) version with next settings:

"window.titleBarStyle": "custom" ← this will fixes alt-shift behavior for me
"window.enableMenuBarMnemonics": false
"window.customMenuBarAltFocus": false
"window.menuBarVisibility": "visible" (any)

Glad to test next builds if needed.
Still loving vscode of course!

I've been on 1.39 for some time because of this issue. @mrkeuz's comment prompted me to upgrade to 1.47 and it seems that the issue I had is now fixed. That said, I can't speak for the OP.

Update: but I think its only fixed when "window.titleBarStyle" : "custom" is applied.

Debian 10 + Gnome 3.30.2
tested on 1.39.2 - works properly as @MurzNN said.
tested on 1.47.3 - still a proplem
tested on 1.48.0 - still a problem

the "window.titleBarStyle" : "custom" settings option did not work for me...

I would like to clarify the steps to reproduce. pressing alt then shit then releasing alt first will cause the issue, the issue does not occur when releasing shift first.

also experiencing this in Signal-Desktop https://github.com/signalapp/Signal-Desktop/issues/3621

looks like this problem originates from electron issues from version 6+:
https://github.com/electron/electron/issues/11106
https://github.com/electron/electron/issues/22213

Was this page helpful?
0 / 5 - 0 ratings