| name | keybindings-help |
| description | Help edit ~/.deepcode/keybindings.json. |
keybindings-help
Add or modify entries in ~/.deepcode/keybindings.json. Explain the
syntax + show what will change.
When to invoke
- User says "bind X to Y", "add a shortcut", "enable Vim mode".
- User runs
/keybindings and asks for a tweak.
File schema
{
"enabled": true,
"vim": false,
"bindings": [
{ "key": "ctrl+shift+t", "action": "/clear" },
{ "key": "esc esc", "action": "/rewind" },
{ "key": "g g", "action": "cursor-buffer-start", "when": "NORMAL" }
]
}
Key chord syntax
- Modifiers:
ctrl, shift, alt, meta.
- Separator:
+ for chord (ctrl+a), space for sequence (g g).
- The order of modifiers is normalized, so
Shift+Ctrl+A ≡ ctrl+shift+a.
Action forms
- Slash command —
"/clear", "/mode plan", etc.
- Literal insertion —
"insert:hello" inserts "hello" at cursor.
- Built-in action —
cursor-line-start, kill-to-end, vim-insert-mode, etc.
See DEFAULT_KEYBINDINGS in packages/core/src/keybindings/index.ts
for the full list.
Vim mode
When vim: true, the when field constrains a binding to NORMAL /
INSERT / VISUAL. Vim defaults (i, a, v, gg, dd, yy, p, u) ship by
default; user bindings layer on top.
Process
- Read current file (or note it doesn't exist).
- Validate the user's chord (must match
chord-syntax).
- Check for collisions with existing bindings — warn the user.
- Show the diff, ask y/n/e.
- Write back.