mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Add F10 keybinding for debugger step, even on Web. (#183510)
Fixes #181792. Previously, for Web the keyboard shortcut was Alt-F10, because it was believed that F10 could not be bound on browsers. This turned out to be incorrect, so we make the shortcut consistent (F10) with desktop VSCode which is also what many other debuggers use. We keep Alt-F10 on web as a secondary keybinding to keep the experience some web users may have gotten used to by now.
This commit is contained in:
parent
28e1298f31
commit
dbead18832
|
@ -473,7 +473,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: STEP_OVER_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: isWeb ? (KeyMod.Alt | KeyCode.F10) : KeyCode.F10, // Browsers do not allow F10 to be binded so we have to bind an alternative
|
||||
primary: KeyCode.F10,
|
||||
secondary: isWeb ? [(KeyMod.Alt | KeyCode.F10)] : undefined, // Keep Alt-F10 for web for backwards-compatibility
|
||||
when: CONTEXT_DEBUG_STATE.isEqualTo('stopped'),
|
||||
handler: async (accessor: ServicesAccessor, _: string, context: CallStackContext | unknown) => {
|
||||
const contextKeyService = accessor.get(IContextKeyService);
|
||||
|
|
Loading…
Reference in a new issue