app-hotkeys
Installation
SKILL.md
App hotkeys
This skill builds on hotkeys-core. The adapter skill's app hotkeys reference shows the wiring in your framework.
App hotkeys are the library's shortcut catalog. Use them instead of a separate shortcut config, context, or hand-written cheat sheet. One module declares every shortcut. The root provider holds the user's custom hotkeys. Components register the declared app hotkeys with their callbacks. Plain hotkeys with meta are enough when a list only needs what is mounted right now.
import { defineAppHotkeys } from '@tanstack/hotkeys'
export const appHotkeys = defineAppHotkeys({
'doc.save': { hotkey: 'Mod+S', meta: { name: 'Save' }, scope: 'document' },
'comment.post': {
hotkey: 'Mod+S',
meta: { name: 'Post comment' },
scope: 'comments',
},
'theme.toggle': { hotkey: null, meta: { name: 'Toggle theme' } },
})