just-hotkeys
Version:
A declarative keyboard shortcut manager for JavaScript and TypeScript - framework agnostic with React support
21 lines • 632 B
TypeScript
/**
* Declarative Shortcuts - A framework-agnostic keyboard shortcut manager
*
* @example
* ```typescript
* import { createShortcuts } from 'just-hotkeys';
*
* const cleanup = createShortcuts({
* 'cmd+k': () => openSearch(),
* 'cmd+/': () => toggleHelp(),
* 'esc': () => closeModal()
* });
*
* // Later...
* cleanup();
* ```
*/
export { createShortcuts, shortcuts } from './manager';
export type { ShortcutCallback, ShortcutMap, ShortcutOptions, ShortcutManager, ParsedShortcut, } from './types';
export { parseShortcut, matchesShortcut, normalizeShortcut } from './parser';
//# sourceMappingURL=index.d.ts.map