Open scnwwu opened 6 months ago
A little late here, but whoever is facing this issue, you can make use of editor.addAction
method to add a custom command.
editor.addAction({
id: 'TOGGLE_TAB_FOCUS_MODE',
label: 'Toggle Tab Focus Mode',
run: () => {
editor.trigger('shortcut', 'editor.action.toggleTabFocusMode', '');
}
});
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.36.0#example-creating-the-editor-hello-world
Monaco Editor Playground Code
No response
Reproduction Steps
Open Command Palette, search for
Toggle Tab Key Moves Focus
commandActual (Problematic) Behavior
Toggle Tab Key Moves Focus
missing from Command Palette. Ctrl+M still works but if user don't know it, they can't find it. With #4124, it's harder for user to know it. It's an important accessibility feature.Expected Behavior
Toggle Tab Key Moves Focus
command exists in Command PaletteAdditional Context
v0.35.0 works well