Use when the user wants to customize keyboard shortcuts, rebind keys, add chord bindings, or modify ~/.claude/keybindings.json. Examples: "rebind ctrl+s", "add a chord shortcut", "change the submit key", "customize keybindings".
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Keybindings Help?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tomorrow-dev-keybindings-help)
---
name: keybindings-help
description: 'Use when the user wants to customize keyboard shortcuts, rebind keys, add chord bindings, or modify ~/.claude/keybindings.json. Examples: "rebind ctrl+s", "add a chord shortcut", "change the submit key", "customize keybindings".'
allowed-tools: Read
user-invocable: false
---
# Keybindings Skill
Create or modify `~/.claude/keybindings.json` to customize keyboard shortcuts.
## CRITICAL: Read Before Write
**Always read `~/.claude/keybindings.json` first** (it may not exist yet). Merge changes with existing bindings — never replace the entire file.
- Use **Edit** tool for modifications to existing files
- Use **Write** tool only if the file does not exist yet
## File Format
```json
{
"$schema": "https://www.schemastore.org/claude-code-keybindings.json",
"$docs": "https://code.claude.com/docs/en/keybindings",
"bindings": [
{
"context": "Chat",
"bindings": {
"ctrl+e": "chat:externalEditor"
}
}
]
}
```
Always include the `$schema` and `$docs` fields.
## Keystroke Syntax
**Modifiers** (combine with `+`):
- `ctrl` (alias: `control`)
- `alt` (aliases: `opt`, `option`) — note: `alt` and `meta` are identical in terminals
- `shift`
- `meta` — same key as `alt` in terminals (Option key on macOS)
- `cmd` (aliases: `command`, `super`, `win`) — Command key on macOS, Windows key on Windows, Super key on Linux; not the same as `meta`. Most terminals never send it (only ones that report the Super modifier, such as through the Kitty keyboard protocol or xterm `modifyOtherKeys`), so prefer `ctrl` for bindings that should work everywhere
**Special keys**: `escape`/`esc`, `enter`/`return`, `tab`, `space`, `backspace`, `delete`, `up`, `down`, `left`, `right`
**Chords**: Space-separated keystrokes, e.g. `ctrl+k ctrl+s` (3-second timeout between keystrokes)
**Examples**: `ctrl+shift+p`, `alt+enter`, `ctrl+k ctrl+n`
## Unbinding Default Shortcuts
Set a key to `null` to remove its default binding:
```json
{
"context": "Chat",
"bindings": {
"ctrl+s": null
}
}
```
## How User Bindings Interact with Defaults
- User bindings are **additive** — they are appended after the default bindings
- To **move** a binding to a different key: unbind the old key (`null`) AND add the new binding
- A context only needs to appear in the user's file if they want to change something in that context
## Common Patterns
### Rebind a key
To change the external editor shortcut from `ctrl+g` to `ctrl+e`:
```json
{
"context": "Chat",
"bindings": {
"ctrl+g": null,
"ctrl+e": "chat:externalEditor"
}
}
```
### Add a chord binding
```json
{
"context": "Global",
"bindings": {
"ctrl+k ctrl+t": "app:toggleTodos"
}
}
```
## Behavioral Rules
1. Only include contexts the user wants to change (minimal overrides)
2. Validate that actions and contexts are from the known lists below
3. Warn the user proactively if they choose a key that conflicts with reserved shortcuts or common tools like tmux (`ctrl+b`) and screen (`ctrl+a`)
4. When adding a new binding for an existing action, the new binding is additive (existing default still works unless explicitly unbound)
5. To fully replace a default binding, unbind the old key AND add the new one
## Validation
Claude Code validates `~/.claude/keybindings.json` when it loads; warnings go to the debug log. After editing the file, re-check it against the rules below and fix anything that matches.
### Common Issues and Fixes
| Issue | Cause | Fix |
| --- | --- | --- |
| `keybindings.json must have a "bindings" array` | Missing wrapper object | Wrap bindings in `{ "bindings": [...] }` |
| `"bindings" must be an array` | `bindings` is not an array | Set `"bindings"` to an array: `[{ context: ..., bindings: ... }]` |
| `Unknown context "X"` | Typo or invalid context name | Use exact context names from the Available Contexts table |
| `"X" is not a modifier, so the binding "Y" ... is ignored` | Error: `X` comes before the key in `Y` but is not a modifier (a typo such as `ctl` for `ctrl`, or two keys joined with `+` instead of a space), so the binding is ignored and every key keeps its current action | Correct the modifier using the Keystroke Syntax list (the message suggests the corrected keystroke when it can), or put a space between the keystrokes of a chord |
| `Duplicate key "X" in Y bindings` | Same key defined twice in one context | Remove the duplicate; JSON uses only the last value |
| `"X" may not work: ...` | Key conflicts with terminal/OS reserved shortcut | Choose a different key (see Reserved Shortcuts section) |
| `Invalid action for "X"` | Action value is not a string or null | Actions must be strings like `"app:help"` or `null` to unbind |
### Example validation warnings (debug log)
```
[keybindings] Found 2 validation issue(s)
[keybindings] [error] Unknown context "chat" — Valid contexts: Global, Chat, Autocomplete, ...
[keybindings] [warning] "ctrl+c" may not work: Terminal interrupt (SIGINT)
```
**Errors** mean some or all of your bindings are ignored or don't work as written, and must be fixed. **Warnings** indicate potential conflicts but the binding may still work.
## Available Contexts
| Context | Where it applies |
| --- | --- |
| `Global` | Everywhere on the screen |
| `Chat` | The prompt input |
| `Scroll` | Scrolling the conversation |
| `Transcript` | The transcript view (`app:toggleTranscript`) |
| `Select` | Lists and menus |
| `Footer` | The footer row |
| `Attachments` | Attached images and files |
| `HistorySearch` | The `history:search` prompt |
## Available Actions
| Action | Default key | Effect |
| --- | --- | --- |
| `chat:submit` | `enter` | Send the message |
| `chat:sendNow` | `ctrl+enter`, `ctrl+x ctrl+s` | Send now, interrupting the turn |
| `chat:queueAfterTurn` / `chat:queueSubmit` | `ctrl+q`, `ctrl+x enter` | Queue after the running turn |
| `chat:queueToFront` | `alt+up` | Move the queued message to the front |
| `chat:killAgents` | `ctrl+x ctrl+k` | Stop background agents |
| `chat:externalEditor` | `ctrl+g`, `ctrl+x ctrl+e` | Edit the prompt in `$EDITOR` |
| `chat:clearInput` | `ctrl+l` | Clear the input |
| `chat:stash` | `ctrl+s` | Stash the prompt |
| `chat:undo` | `ctrl+_`, `ctrl+shift+-` | Undo in the input |
| `chat:modelPicker` | `meta+p` | Pick the model |
| `chat:increaseEffort` / `chat:decreaseEffort` | `shift+up` / `shift+down` | Change the effort |
| `chat:newline` | `shift+enter`, `alt+enter`, `ctrl+j` | Insert a newline |
| `chat:cycleMode` | `shift+tab` | Cycle the permission mode |
| `chat:imagePaste` | `ctrl+v` | Paste an image |
| `chat:cancel` | `escape` | Cancel |
| `chat:fullHistory` | `ctrl+f` | Show the full history |
| `chat:toggleDepth` | `meta+d` | Toggle the detail depth |
| `chat:backspace`, `chat:delete` | `backspace`, `delete` | Delete a character |
| `chat:lineStart`, `chat:lineEnd` | `ctrl+a`, `ctrl+e` | Move to the line start or end |
| `chat:cursorLeft`, `chat:cursorRight` | `left`, `right` | Move the cursor |
| `chat:pageUp`, `chat:pageDown`, `scroll:pageUp`, `scroll:pageDown` | `pageup`, `pagedown` | Scroll a page |
| `chat:openQuestions` | none | Open the pending questions |
| `history:previous`, `history:next` | `up`, `down` | Walk the prompt history |
| `history:search` | `ctrl+r` | Search the history |
| `autocomplete:accept` | `tab` | Accept the completion |
| `app:palette` | `ctrl+k` | Open the command palette |
| `app:toggleSidePanel` | `ctrl+\` | Toggle the side panel |
| `app:toggleTodos` | `ctrl+t` | Toggle the task details |
| `app:toggleTranscript` | `ctrl+o` | Toggle the transcript |
| `app:interrupt` | `ctrl+c` | Interrupt, then quit |
| `app:exit` | `ctrl+d` | Exit on an empty input |
| `theme:editCustom` | none | Edit the custom theme |
| `voice:pushToTalk` | `meta+v` | Push to talk |
## Reserved Shortcuts
`ctrl+c` (interrupt) and `ctrl+d` (end of input) are claimed by the terminal; `ctrl+z` suspends the process and `ctrl+b` / `ctrl+a` collide with tmux and screen.