function createMultiHotkeyChordHandler(handlers, options?): (event) => void;Defined in: match.ts:145
Creates a handler that matches several chords.
A map of chord strings to their handlers
CreateHotkeyChordHandlerOptions = {}
Options for matching and handling
A function that can be used as an event handler
(event) => void
const handler = createMultiHotkeyChordHandler({
'Mod+S': (event, { hotkey }) => handleSave(),
'Mod+Z': (event, { hotkey }) => handleUndo(),
'Mod+Shift+Z': (event, { hotkey }) => handleRedo(),
})
document.addEventListener('keydown', handler)