scmJS docs

api.hotkeys

HotkeyApi

Key combinations, tried before the editor's own and never while a text field has focus.

Members

add

add(combo: string, run: (() => void) | { command: string; }): Disposable;

"Ctrl+Shift+I", "Alt+F9", "F8" — modifiers in any order, then a key name. *

api.hotkeys.add("Ctrl+Shift+W", () => handle.setVisible(!handle.visible()));