Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.19 KB

File metadata and controls

42 lines (32 loc) · 1.19 KB

powerkeys

Purpose

powerkeys brings VS Code-style keyboard shortcuts to modern web apps. It handles scoped bindings, multi-step sequences, when clauses, editable-target policies, shortcut recording, atomic rebinding through binding sets, pre-dispatch candidate guards, and external availability checks in one small runtime.

Installation

pnpm add powerkeys

Quick Example

import { createShortcuts } from 'powerkeys'

const shortcuts = createShortcuts({ target: document })

shortcuts.bind({
  combo: 'Mod+k',
  preventDefault: true,
  handler: () => {
    openCommandPalette()
  },
})

Documentation Map