Skip to content

use alt to focus the menu and and navigation - #53924

Merged
SteVen Batten (sbatten) merged 4 commits into
masterfrom
sbatten/altFocusMenu
Jul 10, 2018
Merged

SteVen Batten (sbatten) merged 4 commits into
masterfrom
sbatten/altFocusMenu

Conversation

@sbatten

Copy link
Copy Markdown
Member

Please try this out with toggle setting enabled and without. Lots of code churn here because my previous focused behavior was poorly defined. I don't know how much better the new implementation but the idea is to work like a state machine with the following guidelines. If you plan to change MenubarState, update the focused menu and set the new state. If you are not modifying the state, you must handle the menu behavior yourself.

@bpasero Benjamin Pasero (bpasero) left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SteVen Batten (@sbatten) I like the way it works now, good job. I think I found one minor bug:

  • Alt-click to focus menu
  • navigate to Terminal and execute Clear
  • Alt+click again

=> the menu does not have focus (but menmonics show up)

Comment thread src/vs/base/browser/ui/menu/menu.ts Outdated

private createSubmenu() {
if (!this.parentData.submenu) {
if (!this.parentData.submenu && this.builder) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SteVen Batten (@sbatten) how can this happen that we react on click but have not been created?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benjamin Pasero (@bpasero) converting to runoncescheduler fixed the issue, reverted this change

@jakub-g

Copy link
Copy Markdown

Hi SteVen Batten (@sbatten) I'd like to test this, I just installed insiders build on Windows, but it doesn't seem to work out of the box. How can I enable it? Is insiders build new enough to have it?

Version: 1.26.0-insider
Commit: 7e992cab07f6d3faf5a137e8ca0d094f8dffeee6
Date: 2018-07-12T08:03:44.466Z
Electron: 1.7.12
Chrome: 58.0.3029.110
Node.js: 7.9.0
V8: 5.8.283.38
Architecture: x64

@sbatten

Copy link
Copy Markdown
Member Author

jakub-g (@jakub-g) this change affects the new custom menubar in insiders.
To enable, change the setting window.titleBarStyle to custom in your settings.json

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants