powerkeys brings VS Code-style keyboard shortcuts to modern web apps. It handles
scoped bindings, multi-step sequences, when clauses, editable-target policies,
and shortcut recording in one small runtime.
pnpm add powerkeysimport { createShortcuts } from 'powerkeys'
const shortcuts = createShortcuts({ target: document })
shortcuts.bind({
combo: 'Mod+k',
preventDefault: true,
handler: () => {
openCommandPalette()
},
})- Conceptual guide: docs/context.md
- Runnable examples: examples/basic-usage.ts, examples/scopes-and-when.ts, examples/sequences.ts, examples/record-shortcut.ts
- Exact exported signatures: dist/index.d.mts
- Interactive demo: demo/src/App.tsx