Skip to content

Conflicting keyboard shortcuts on web #190180

@rehmsen

Description

@rehmsen

This is a follow up on #181792, which I can no longer comment on. The goal of #183510 was to align the shortcuts for stepping in the debugger between wen and electron. For this purpose, I changed the shortcut for web to also be F10 (and kept the old shortcut alt+F10 as a secondary for backwards compatibility). Unfortunately, I overlooked that on web, there is a command that does not exist on electron, which is "Focus Application Menu" (added in #82759), which also uses F10. Both are installed with the same priority (WorkbenchContrib), but as far as I can tell "Focus Application Menu" always takes precedence (maybe it is loaded earlier?).

The good news is that my change (#183510) did not make anything worse, because we still have the old binding as secondary, and "Focus Application Menu" works as before because it takes precedence. The bad news is that my change did not have any effect (it did not make F10 work on web for the debugger as intended).

I would like to discuss if there is any hope in resolving this conflict though. My understanding is that on Electron, focusing the menu bar is not handled by VSCode because there are platform specific native ways to do this:

  • on Mac one can press ctrl+F2
  • on Windows it is Alt + letter of the desired menu item

I see three ways forward:

  1. We somehow increase the priority of F10 during debugging - so that F10 would go to application menu only when not suspended in the debugger - not sure how much many users intend to go to the application menu with F10 while in the debugger. When not suspended in the debugger, it could continue to go to the Application Menu.
  2. We find new, maybe platform specific shortcuts for going to the Application Menu and free up F10 for stepping in the debugger. For example we could try to do something inspired by how the native shortcuts work, like adding one more modifier and otherwise keep ctrl+F2 and Alt+letter etc.
  3. We live with Alt+F10 for stepping in the debugger and don't change anything (or rollback Add F10 keybinding for debugger step, even on Web. #183510, it is mostly a no-op).

Sorry for opening this can of worms... @roblourens @bpasero you were involved in this so far - any opinions?

Metadata

Metadata

Assignees

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesinsiders-releasedPatch has been released in VS Code Insidersunder-discussionIssue is under discussion for relevance, priority, approach

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions