[Feature Request] Support keybindings for user-defined slash commands
Bug Description
Title: Allow keybindings to invoke user-defined slash commands
Body:
Currently ~/.claude/keybindings.json bindings can only trigger actions from a fixed built-in namespace (chat:submit, app:toggleTodos, etc.). There's no way to bind a key to a user-defined slash command in ~/.claude/commands/<name>.md.
This is a meaningful gap because slash commands are the extension surface users build personalized workflows on top of, but power-user UX (one-key invocation) is closed to them.
Concrete use case: I built a /guide slash command that pauses the current task and presents an AskUserQuestion menu (Continue / Redirect / Show status / Fork / Abort). It's invaluable for redirecting mid-session. I wanted to bind Alt+G to it so I don't have to type the whole command, but no action type supports that.
Proposed shapes (any one would solve it):
// Option A — explicit slash action
{ "key": "alt+g", "action": "slash:guide" }
// Option B — generic text-typing action
{ "key": "alt+g", "action": "typeText", "text": "/guide\n" }
// Option C — flat string, "slash command if starts with /"
{ "key": "alt+g", "command": "/guide" }
Bonus value: this would also unlock keybindings for plugin-namesperpowers:brainstorming, which are even more typing to invokemanually.
Currently I'm working around it by displaying a > Lost? type /guide hint in my statusline so users at least see the option. A real binding would be much better.
Environment Info
- Platform: win32
- Terminal: windows-terminal
- Version: 2.1.119
- Feedback ID: a9a3e02d-ebcb-468e-bcfd-e9419e151bde
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗