[BUG] keybindings.json not loaded

Status Fixed / completed
Reported on v2.1.77
Maintainer reply None cached
Activity 3 comments · opened Mar 23, 2026 · closed Apr 8, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

~/.claude/keybindings.json is not being loaded. No keybindings take effect at all, including nullifying enter in the Chat context (Enter still submits).

My keybindings.json:

{
  "$docs": "https://code.claude.com/docs/en/keybindings",
  "$schema": "https://www.schemastore.org/claude-code-keybindings.json",
  "bindings": [
    {
      "bindings": {
        "enter": null,
        "escape": null,
        "escape escape": null
      },
      "context": "Chat"
    },
    {
      "bindings": {
        "escape": null
      },
      "context": "Confirmation"
    }
  ]
}

Setting enter to null was a test to confirm the file isn't being read at all. Enter still submits messages.

What Should Happen?

With the config above, enter should not submit, escape should not cancel, and escape escape should not clear input.

Error Messages/Logs

$ cat ~/.claude/keybindings.json
# outputs the correct JSON shown above

Steps to Reproduce

  1. Place a valid keybindings.json at ~/.claude/keybindings.json with enter set to null in the Chat context
  2. Restart Claude Code
  3. Type text and press Enter — it still submits (keybindings not loaded)

Claude Model

claude-opus-4-6

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.77 (Claude Code)

Platform

Anthropic API

Operating System

NixOS Linux (kernel 6.19.8)

Terminal/Shell

zsh (Ghostty)

Additional Information

One possibly relevant detail: ~/.claude/keybindings.json is a symlink in my setup. ~/.claude/settings.json is also a symlink and is loaded correctly, so this may or may not be the cause.

Related issues:

  • #15786 — Atomic file writes fail with multi-level symlinks
  • #25087 — keybindings.json ignored in Claude desktop app
  • #32248 — Custom keybindings aren't picked up on first run

View original on GitHub ↗

3 Comments

yurukusa · 5 months ago

Debugging steps

  1. Check file format — keybindings.json must be a JSON array, not an object:
// ❌ Wrong (object with $docs key):
{
  "$docs": "...",
  "bindings": [...]
}
// ✅ Correct (array):
[
  {"key": "ctrl+enter", "command": "chat:submit"},
  {"key": "enter", "command": "chat:newline"}
]
  1. Validate JSON syntax:
python3 -m json.tool ~/.claude/keybindings.json
  1. Check file permissions:
ls -la ~/.claude/keybindings.json
  1. Restart Claude Code after editing — keybindings are loaded at startup, not hot-reloaded.
  2. Check for $docs key — some Claude Code versions may not support the $docs metadata key in the file. Try removing it.
torarnv · 4 months ago

That doesn't work either @yurukusa This has no effect:

[
  {"key": "ctrl+e", "command": "app:exit"},
  {"key": "shift+k", "command": "chat:submit"}
]
github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.