-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Menu bar visibility toggling when it should't #35010
Comments
Can you please open your keybindings.json file and check what keybindings are attached to the |
This might be an Electron limitation. @sandy081 We don't do anything special on |
@sandy081 There is nothing set for that in my keybindings.json file. Apps commonly use |
Just messed around with it more and it's really weird. Apparently if I press |
This affects Windows as well. The core issue is that Alt toggles the menu when it is pressed as part of some other key combination in certain cases. Scenario 1: hold Ctrl, press and release Alt Scenario 2: hold Alt, press and release Ctrl, release Alt Ctrl can be replaced with any other key in both scenarios. The expected behavior in both cases is that the menu bar is not toggled. What I suspect is going on is that if another key is pressed while Alt is being held then releasing alt will not toggle the menu bar, but if another key is already held down while Alt is pressed and released then releasing Alt will toggle the menu bar. The specific change I'm supporting is that pressing and releasing Alt while another key is held should not cause the menu bar to be toggled. I intended to open an issue for this as the inconsistency seems to be a bug. It's a constant annoyance in my daily work with VS Code. I use Ctrl+Alt+Left/Right to move focus between groups and if Alt bounces an extra time it toggles the menu bar. I also use different combinations of modifier keys and Left/Right for various editor group related actions so when I'm thinking about my next action I may press Ctrl+Alt then change my mind and release Alt. It happens too when I'm working quickly and I accidentally hit Alt a split second after theIt's an unwanted distraction to say the least. |
So it sounds like this is a more fundamental issue with whatever is handling keyboard event bindings in general. If I have an event bound to |
I noticed another aspect of this issue today: Escape does not close the menu bar. Steps to reproduce
Expected behavior The expected behavior is supported by the fact that when I press Alt+H to open the Help menu, highlight something, and press Enter the menu bar will be hidden. |
@bpasero I don't think the linux label is appropriate here, as this affects Windows in addition to Linux. |
I am in the exact situation this issue describes. I want to change the toggle key from As already stated, the root of this issue in this case is that, to hide the menubar, Can What's confusing things is If there's no good reason for this can we not just have the default If there's reasons against that, can the If there is no key set for However, If a user has explicity set a keybinding to |
@bpasero the fix in electron has been approved. FWIW I still think if a toggleMenuBar shortcut key is set it should override the default Alt behavior but should be a non issue now. I might PR if you agree |
I'm excited to finally have a solution to the main annoyance. There are obviously still a few improvements that should be made as explained by @lyallh but this is good stuff! The question now is, when will we see this electron fix in a VSCode release? |
@jwarkentin Happy to report that my fix was included in the recent I just built and ran the branch and can confirm the menu bar is no longer "toggling when it shouldn't". @bpasero may have some idea of when this branch might make it into a release... Edit: Upgrade to electron 2.0.x is a March 2018 milesone. Follow #45542 for builds! |
Closing as the update to Electron 2.0.0-beta.6 landed via 88603b3. It should be in insider releases end of this week. |
Reopening as we had to revert the update. |
Closing, we pushed the Electron 2.0.x update for July release. |
Verified on Windows and Linux. |
@bpasero There are still two issues with this:
As I mentioned earlier in the thread, issue 1 is a daily annoyance for me, as it seems to happen very frequently when I jump between editor groups. The new menu bar doesn't have these issues and it feels like the menu bars should be consistent with each other and with the rest of the Windows experience. |
@akbyrd same issue for me, I ended up setting the toggle to "hidden", which means it never toggles and I can't use it at all. However, ctrl+shift+P allows me to call up any command I really need, luckily |
I'm running on a Linux environment using Gnome. I have the
window.menuBarVisibility
setting set totoggle
which is triggered with theAlt
key. Unfortunately, when I switch desktops using the default keyboard shortcut ofCtrl+Alt+[arrow]
, VSCode seems to think I've pressedAlt
and it toggles the menu bar every time which is really annoying.I tried changing the keyboard shortcut to
Alt+M
to toggle visibility but VSCode seems to still make it also toggle withAlt
no matter what shortcut I set. The shortcut I configure just becomes an additional way to toggle it. I then tried setting the menu bar visibility tohidden
hoping that would disableAlt
so it would only toggle with my configured shortcut but once I press my configured toggle shortcut VSCode will go and change my setting fromhidden
back totoggle
thus re-enabling theAlt
shortcut to toggle.There needs to be a way to either disable/change the
Alt
menu toggle shortcut or at the very least not trigger it when I switch desktops holdingCtrl+Alt+[arrow]
.The text was updated successfully, but these errors were encountered: