원클릭으로
use-shortcut
Add scoped, accessible keyboard shortcuts to React apps with @remcostoeten/use-shortcut.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add scoped, accessible keyboard shortcuts to React apps with @remcostoeten/use-shortcut.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | use-shortcut |
| description | Add scoped, accessible keyboard shortcuts to React apps with @remcostoeten/use-shortcut. |
Add scoped, accessible keyboard shortcuts to React apps with @remcostoeten/use-shortcut. Prefer the narrow React entrypoint for app code:
import { useShortcut } from "@remcostoeten/use-shortcut/react"
useShortcutBinding() for one cleanup-safe shortcut binding in a component.useShortcut() for fluent one-off bindings.useShortcutMap() or registerShortcutMap() for config-driven command sets..bind(...) when combos already exist as strings from settings or config.ignoreInputs is true.aria-live text and non-color status cues..on(...) registrations inside useEffect() and return cleanup that calls unbind().useCallback() or shortcut maps with useMemo() when needed.ShortcutResults when enabling, disabling, triggering, or unbinding is needed.createShortcutGroup() or useShortcutGroup().Add a declarative shortcut:
useShortcutBinding("mod+k", openCommandPalette, {
description: "Open command palette",
preventDefault: true,
})
Use a sequence:
useShortcutBinding("g then d", goToDashboard, {
description: "Go to dashboard",
sequenceTimeout: 1000,
})
Use scopes:
const $ = useShortcut({ activeScopes: "navigation" })
useEffect(() => {
const shortcut = $.in("editor").mod.key("s").on(saveFile)
$.setScopes("editor")
return () => shortcut.unbind()
}, [$, saveFile])
Use structured debug metadata:
const $ = useShortcut({
debug: {
console: true,
includeCode: true,
includeLocation: true,
includeKeyCode: true,
},
})
const unsubscribe = $.onDebug((event) => {
showShortcutTelemetry(event.input.combo, event.attempts)
})
Use per-shortcut attempt feedback:
useEffect(() => {
const result = $.shift.key("e").then("e").on(runProbe)
const removeAttempt = result.onAttempt?.((matched, event, details) => {
updateAttemptStatus({ matched, key: event.key, status: details?.status })
})
return () => {
removeAttempt?.()
result.unbind()
}
}, [$, runProbe, updateAttemptStatus])
Read references/api.md when you need exact entrypoints, option names, result shapes, parser/formatter utilities, or testing guidance.
Use the package scripts from the workspace root:
bun run package:typecheck
bun run package:test
bun run package:build
For docs changes, use:
bun run docs:lint
bun run docs:test
bun run docs:build