From c9efcc2cd0958e959caeca40095b5aceeb192c4e Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Sun, 12 Jan 2025 10:16:29 -0500 Subject: [PATCH] Support back and forward keys in default shortcuts (#237701) Support back and forward keys in default shortcuts These keys can be found on certain keyboards, and on custom layouts like [Extend](https://dreymar.colemak.org/layers-extend.html). --- .../workbench/browser/parts/editor/editorActions.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 9d9766f4eb5..fc9b8ec03e0 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -1420,9 +1420,9 @@ export class NavigateForwardAction extends Action2 { precondition: ContextKeyExpr.has('canNavigateForward'), keybinding: { weight: KeybindingWeight.WorkbenchContrib, - win: { primary: KeyMod.Alt | KeyCode.RightArrow }, - mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Minus }, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Minus } + win: { primary: KeyMod.Alt | KeyCode.RightArrow, secondary: [KeyCode.BrowserForward] }, + mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Minus, secondary: [KeyCode.BrowserForward] }, + linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Minus, secondary: [KeyCode.BrowserForward] } }, menu: [ { id: MenuId.MenubarGoMenu, group: '1_history_nav', order: 2 }, @@ -1455,9 +1455,9 @@ export class NavigateBackwardsAction extends Action2 { icon: Codicon.arrowLeft, keybinding: { weight: KeybindingWeight.WorkbenchContrib, - win: { primary: KeyMod.Alt | KeyCode.LeftArrow }, - mac: { primary: KeyMod.WinCtrl | KeyCode.Minus }, - linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Minus } + win: { primary: KeyMod.Alt | KeyCode.LeftArrow, secondary: [KeyCode.BrowserBack] }, + mac: { primary: KeyMod.WinCtrl | KeyCode.Minus, secondary: [KeyCode.BrowserBack] }, + linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Minus, secondary: [KeyCode.BrowserBack] } }, menu: [ { id: MenuId.MenubarGoMenu, group: '1_history_nav', order: 1 },