Skip to content

Commit 4bacd64

Browse files
authored
Merge pull request microsoft#187762 from microsoft/merogge/acc-buffer-bindings
use diff't keybinding for navigating commands in the accessible buffer for mac when in screen reader mode
2 parents 5b9cf3d + 6e0d58e commit 4bacd64

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/vs/workbench/contrib/terminalContrib/accessibility/browser/terminal.accessibility.contribution.ts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,14 @@ registerTerminalAction({
129129
keybinding: [
130130
{
131131
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
132-
weight: KeybindingWeight.WorkbenchContrib + 2,
133-
when: TerminalContextKeys.accessibleBufferFocus
132+
when: ContextKeyExpr.and(TerminalContextKeys.accessibleBufferFocus, CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
133+
weight: KeybindingWeight.WorkbenchContrib + 2
134+
},
135+
{
136+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
137+
mac: { primary: KeyMod.Alt | KeyCode.DownArrow },
138+
when: ContextKeyExpr.and(TerminalContextKeys.accessibleBufferFocus, CONTEXT_ACCESSIBILITY_MODE_ENABLED),
139+
weight: KeybindingWeight.WorkbenchContrib + 2
134140
}
135141
],
136142
run: async (c) => {
@@ -151,8 +157,14 @@ registerTerminalAction({
151157
keybinding: [
152158
{
153159
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
154-
weight: KeybindingWeight.WorkbenchContrib + 2,
155-
when: TerminalContextKeys.accessibleBufferFocus
160+
when: ContextKeyExpr.and(TerminalContextKeys.accessibleBufferFocus, CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
161+
weight: KeybindingWeight.WorkbenchContrib + 2
162+
},
163+
{
164+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
165+
mac: { primary: KeyMod.Alt | KeyCode.UpArrow },
166+
when: ContextKeyExpr.and(TerminalContextKeys.accessibleBufferFocus, CONTEXT_ACCESSIBILITY_MODE_ENABLED),
167+
weight: KeybindingWeight.WorkbenchContrib + 2
156168
}
157169
],
158170
run: async (c) => {

0 commit comments

Comments
 (0)