Skip to content

Commit c9efcc2

Browse files
Support back and forward keys in default shortcuts (microsoft#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).
1 parent a2ea514 commit c9efcc2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/vs/workbench/browser/parts/editor/editorActions.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,9 +1420,9 @@ export class NavigateForwardAction extends Action2 {
14201420
precondition: ContextKeyExpr.has('canNavigateForward'),
14211421
keybinding: {
14221422
weight: KeybindingWeight.WorkbenchContrib,
1423-
win: { primary: KeyMod.Alt | KeyCode.RightArrow },
1424-
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Minus },
1425-
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Minus }
1423+
win: { primary: KeyMod.Alt | KeyCode.RightArrow, secondary: [KeyCode.BrowserForward] },
1424+
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Minus, secondary: [KeyCode.BrowserForward] },
1425+
linux: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Minus, secondary: [KeyCode.BrowserForward] }
14261426
},
14271427
menu: [
14281428
{ id: MenuId.MenubarGoMenu, group: '1_history_nav', order: 2 },
@@ -1455,9 +1455,9 @@ export class NavigateBackwardsAction extends Action2 {
14551455
icon: Codicon.arrowLeft,
14561456
keybinding: {
14571457
weight: KeybindingWeight.WorkbenchContrib,
1458-
win: { primary: KeyMod.Alt | KeyCode.LeftArrow },
1459-
mac: { primary: KeyMod.WinCtrl | KeyCode.Minus },
1460-
linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Minus }
1458+
win: { primary: KeyMod.Alt | KeyCode.LeftArrow, secondary: [KeyCode.BrowserBack] },
1459+
mac: { primary: KeyMod.WinCtrl | KeyCode.Minus, secondary: [KeyCode.BrowserBack] },
1460+
linux: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.Minus, secondary: [KeyCode.BrowserBack] }
14611461
},
14621462
menu: [
14631463
{ id: MenuId.MenubarGoMenu, group: '1_history_nav', order: 1 },

0 commit comments

Comments
 (0)