Skip to content

alt+shift toggles window.menuBarVisibility even when the menu bar is disabled #85405

Closed

Description

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:

#66116
#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.

Activity

  1. vscodebot commented on Nov 22, 2019

    @vscodebot
  2. MurzNN commented on Nov 23, 2019

    @MurzNN

    Here maybe possible workaround electron/electron#11106 (comment)

  3. MurzNN commented on Nov 23, 2019

    @MurzNN

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

  4. added
    electron
    linux
    menus
    upstream-issue-linked
    on Nov 27, 2019
  5. MurzNN commented on Nov 28, 2019

    @MurzNN

    Robo (@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?

  6. added
    confirmed
    on Dec 7, 2019
  7. tonyelewis commented on Dec 30, 2019

    @tonyelewis

    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.

  8. MurzNN commented on Feb 16, 2020

    @MurzNN

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

  9. tonyelewis commented on Feb 16, 2020

    @tonyelewis

    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.

  10. MurzNN commented on Feb 16, 2020

    @MurzNN

    After investigating I see that workaround, described in electron/electron#11106 (comment) is not work, so Electron 6.0 release produce new regression, and I post separate issue about this: electron/electron#22213

    Hope that it will be fixed quicker in separate thread!

  11. mrkeuz commented on Jul 10, 2020

    @mrkeuz

    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!

  12. tonyelewis commented on Jul 18, 2020

    @tonyelewis

    I've been on 1.39 for some time because of this issue. Mr Keuz (@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.

  13. DanielLitvak commented on Aug 18, 2020

    @DanielLitvak

    Debian 10 + Gnome 3.30.2
    tested on 1.39.2 - works properly as Alexey Murz Korepov (@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 signalapp/Signal-Desktop#3621

    looks like this problem originates from electron issues from version 6+:
    electron/electron#11106
    electron/electron#22213

  14. manios commented on May 15, 2021

    @manios

    Hello!

    Thanks for your valuable comments! I would like to give you some extra information about the issue and how to reproduce. The system I tested is:

    Operating System:

    • Distributor ID: Linuxmint
    • Description: Linux Mint 20.1
    • Release: 20.1
    • Codename: ulyssa
    • Desktop Environment: MATE

    Visual Studio Code:

    • Version: 1.55.2
    • Commit: 3c4e3df
    • Date: 2021-04-13T09:37:02.931Z
    • Electron: 11.3.0
    • Chrome: 87.0.4280.141
    • Node.js: 12.18.3
    • V8: 8.7.220.31-electron.0
    • OS: Linux x64 5.4.0-72-generic

    As a requirement, I want to have my menu bar visible. I have followed the steps mentioned by Mr Keuz (@mrkeuz) and I have found the following in my system:

    Finding 1

    When I set:

    "window.titleBarStyle": "custom"

    the Alt + Shift combination works correctly both in Text Editor and Command Palette.

    Finding 2

    When I set:

    "window.titleBarStyle": "native"

    the Alt + Shift combination changes the language but enables the focus on the Menu. Therefore the focus is lost from the Text Editor. If used in the Command Palette, then the Palette is closed.

    However, the combination Shift + Alt (note the Shift first) works without any issue.

    Finding 3

    The same issue occurs in my installation of Skype for Linux (Skype version 8.72.0.82) so I tend to believe that it might be an Electron issue after all.

    I hope it helps in the debugging.

    Best regards,
    Christos

  15. MurzNN commented on May 17, 2021

    @MurzNN

    Here electron/electron#28088 is fresh Electron issue about this problem, but it is ignored by Electron developers too for too long time already...

  16. MurzNN commented on Jun 1, 2021

    @MurzNN

    Hooray! Electron issue electron/electron#28088 is fixed! Can we import this patch without waiting for next Election release?

  17. added
    upstream-issue-fixed
    and removed
    upstream-issue-linked
    on Jun 1, 2021
  18. added this to the June 2021 milestone on Jun 1, 2021
  19. deepak1556 commented on Jun 21, 2021

    @deepak1556
    Collaborator

    Latest insiders https://code.visualstudio.com/insiders/ contains the upstream fix. Can anyone verify, thanks!

  20. added
    author-verification-requested
    on Jun 21, 2021
  21. MurzNN commented on Jun 28, 2021

    @MurzNN

    I tested it on KDE 5.22.0 (KDE Frameworks Version: 5.82.0, Ubuntu 21.04 Linux) - it fixed now, great thanks for fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

author-verification-requestedconfirmedelectronlinuxmenusupstream-issue-fixed

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions