use AccessibilityCommandIds for more commands

This commit is contained in:
meganrogge 2023-08-09 14:20:35 -07:00
parent 6c20ed925a
commit a91672675f
No known key found for this signature in database
GPG key ID: AA74638D4878183D
2 changed files with 9 additions and 5 deletions

View file

@ -5,5 +5,9 @@
export const enum AccessibilityCommandIds {
OpenAccessibleView = 'editor.action.accessibleView',
OpenAccessibilityHelp = 'editor.action.accessibilityHelp'
OpenAccessibilityHelp = 'editor.action.accessibilityHelp',
DisableVerbosityHint = 'editor.action.accessibleViewDisableHint',
GoToSymbol = 'editor.action.accessibleViewGoToSymbol',
ShowNext = 'editor.action.accessibleViewNext',
ShowPrevious = 'editor.action.accessibleViewPrevious'
}

View file

@ -27,7 +27,7 @@ const commandPalette = {
class AccessibleViewNextAction extends Action2 {
constructor() {
super({
id: 'editor.action.accessibleViewNext',
id: AccessibilityCommandIds.ShowNext,
precondition: accessibleViewIsShown,
keybinding: {
primary: KeyMod.Alt | KeyCode.BracketRight,
@ -48,7 +48,7 @@ registerAction2(AccessibleViewNextAction);
class AccessibleViewPreviousAction extends Action2 {
constructor() {
super({
id: 'editor.action.accessibleViewPrevious',
id: AccessibilityCommandIds.ShowPrevious,
precondition: accessibleViewIsShown,
keybinding: {
primary: KeyMod.Alt | KeyCode.BracketLeft,
@ -69,7 +69,7 @@ registerAction2(AccessibleViewPreviousAction);
class AccessibleViewGoToSymbolAction extends Action2 {
constructor() {
super({
id: 'editor.action.accessibleViewGoToSymbol',
id: AccessibilityCommandIds.GoToSymbol,
precondition: accessibleViewIsShown,
keybinding: {
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KeyO,
@ -133,7 +133,7 @@ export const AccessibleViewAction = registerCommand(new MultiCommand({
class AccessibleViewDisableHintAction extends Action2 {
constructor() {
super({
id: 'editor.action.accessibleViewDisableHint',
id: AccessibilityCommandIds.DisableVerbosityHint,
keybinding: {
when: ContextKeyExpr.or(accessibleViewIsShown, accessibilityHelpIsShown),
primary: KeyMod.Alt | KeyCode.F6,