Repository navigation
Fix menubar toggle alt key detection on focus - #12167
Conversation
|
💖 Thanks for opening this pull request! 💖 Here is a list of things that will help get it across the finish line:
|
|
Needs review as I'm not exactly sure what the conditions are under OnWidgetActivationStateChanged. Guessing just focus/blur change. |
Reset alt keypress flag on window blur so switching window via Alt+* window manager keybindings can't incedentally trigger annoying menubar toggles
cc27ec6 to
ba24920
Compare
|
i'll leave this up for more review though from someone who would better know conditions leading to |
zcbenz
left a comment
There was a problem hiding this comment.
I'm good with this change, I'm not entirely sure whether it would have side effects, but it looks fine.
|
Congrats on merging your first pull request! 🎉🎉🎉 |
|
Thanks @codebytere and @zcbenz Flag seems to be used only for menu toggling and that now works as intended so should be fine. |
|
Should we backport it to the |
|
#trop run backport |
|
The backport process for this PR has been manually initiated, here we go :D |
|
An error occurred while attempting to backport this PR to "2-0-x", you will need to perform this backport manually |
|
#trop run backport |
|
The backport process for this PR has been manually initiated, here we go :D |
|
We have automatically backported this PR to "2-0-x", please check out #12235 |
The visible menu bar latches on the Alt half of Alt+Tab (the alt-press flag is not reset on window blur), and the native menu bar then consumes the next Escape as "deactivate menu bar". The renderer never receives the event, so xterm/PTY loses Escape after refocus while every other key flows through (electron/electron#12167, #2504; same class as microsoft/vscode#35010). autoHideMenuBar keeps the menu available on Alt and off the Escape path.
The visible menu bar latches on the Alt half of Alt+Tab (the alt-press flag is not reset on window blur), and the native menu bar then consumes the next Escape as "deactivate menu bar". The renderer never receives the event, so xterm/PTY loses Escape after refocus while every other key flows through (electron/electron#12167, #2504; same class as microsoft/vscode#35010). autoHideMenuBar keeps the menu available on Alt and off the Escape path.
The visible menu bar latches on the Alt half of Alt+Tab (the alt-press flag is not reset on window blur), and the native menu bar then consumes the next Escape as "deactivate menu bar". The renderer never receives the event, so xterm/PTY loses Escape after refocus while every other key flows through (electron/electron#12167, #2504; same class as microsoft/vscode#35010). autoHideMenuBar keeps the menu available on Alt and off the Escape path.

Reset alt keypress flag on window blur so switching window via
Alt+* desktop / window manager keybindings can't incedentally trigger
annoying menubar toggles.
This issue is a recurring complaint among some Atom and Vscode editor users. Especially in Vscode where you can't remap the Alt key.
(microsoft/vscode#35010, microsoft/vscode#41070, atom/atom#6037)
A description of the problem was given in PR #3218 but no fix made.