Keybinding

type KeybindingMap = Record<string, Keybinding>;

private normalizeEvent(e: KeyboardEvent): string const parts = []; if (e.ctrlKey) parts.push("ctrl"); if (e.shiftKey) parts.push("shift"); if (e.altKey) parts.push("alt"); if (e.metaKey) parts.push("meta"); parts.push(e.key.toLowerCase()); return parts.join("+"); keybinding

VS Code is renowned for its deep customization. You can modify keybindings through a graphical editor or by editing a keybindings.json file. type KeybindingMap = Record&lt

"save": "defaultKeys": ["ctrl+s"], "context": "global" , "undo": "defaultKeys": ["ctrl+z"], "context": "editor" , "redo": "defaultKeys": ["ctrl+shift+z", "ctrl+y"], "context": "editor" , "open-command-palette": "defaultKeys": ["ctrl+shift+p"], "context": "global" if (e.ctrlKey) parts.push("ctrl")

useEffect(() => manager.on(id, callback); return () => manager.off(id, callback); , [id, callback, ...deps]);