Repository navigation
Conversation
The option can be passed as an option when instanciating a `BrowserWindow`, or be changed using the `setToggleMenuBarOnAltPressed`, method on a `BrowserWindow` instance.
Contributor
|
Why not just disables the auto-hide menu? |
Author
|
@zcbenz I want the menu to be always hidden, not always shown. |
Contributor
|
@tuvistavie There is |
Author
|
@zcbenz Great, that's perfect! Thank you. |
|
Does using |
Author
|
@theFroh It does not seem to. If I press |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I recently started using Atom and had some issues with the
Altkeytoggling menu bar, so I added an option to disable this behavior.
The option can be passed when instanciating a
BrowserWindow,or be changed using the
setToggleMenuBarOnAltPressedmethodon a
BrowserWindowinstance.I also added a
doesToggleMenuBarOnAltPressedmethodto retrieve the current value of the option.
The option is disabled by default, so this will not break or change the behavior of
existing apps.
Background
In some apps, such as Atom, the menu bar can be restored in other ways,
and as it is not something that is done so often (at least for my usage),
I think this option makes sense.
I will explain my issue in Atom, which is my actual motivation for this option.
I use XMonad, and my shortcut to change window focus is
alt+j.When I press
alt,menu_bar_alt_pressedbecomes true.Then, when I press
j, the keydown event is intercepted by XMonad,and the focus changes to some other app, let's say my browser.
As Atom did not receive the
jkeydown event,menu_bar_alt_pressedis still true.When I then want to go back go Atom, I press
alt+jagain. I usually release thejbutton instantly, and thealtafter, so thejkeyup is not handled by atom, butthe
altkeyup event is, which makes the condition for toggling the menu bar true.So basically each time I change focus to some other app and go back to Atom,
the menu bar is toggled, which is a little annoying.