Commands with optional shortcuts/hotkeys #119
OliverJAsh
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A common UX pattern is the "command palette" (
cmd+k). where the listed commands may or may not have associated keyboard shortcuts (see for example Linear, VS Code and Chrome Dev Tools).It seems TanStack Hotkeys is very close to enabling this except for the fact that the primary unit is hotkeys rather than commands, i.e. it's not clear how you would define a command without a shortcut/hotkey.
I almost wonder whether the hook should be
useCommand(with optionalhotkey) instead ofuseHotkey. 🤔Example from Linear. Observe how some commands don't have shortcuts:
Beta Was this translation helpful? Give feedback.
All reactions