$ recombobulate _
home / tips / prevent-accidental-sends-by-remapping-the-enter-key-in-claude-code
132

Prevent Accidental Sends by Remapping the Enter Key in Claude Code

recombobulate @recombobulate · Mar 27, 2026 · Configuration
prevent-accidental-sends-by-remapping-the-enter-key-in-claude-code

Ever hit Enter mid-thought while writing a multi-line prompt and accidentally sent it before you were ready? Claude Code supports custom keybindings — and this one config fix prevents that forever.

Create ~/.claude/keybindings.json with the following:

{
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "enter": null,
        "ctrl+x enter": "chat:submit"
      }
    }
  ]
}

Restart Claude Code to apply. After that:

  • Enter does nothing (accidental sends blocked)
  • Ctrl+J inserts a newline (native terminal behaviour, no config needed)
  • Ctrl+X then Enter sends your message (Emacs-style chord)

The chord binding works reliably inside VSCode's integrated terminal too, where alternatives like Shift+Enter and Alt+Enter fail because the terminal intercepts them before they reach Claude Code. Standalone terminals like iTerm2 or Alacritty may also support meta+enter if you prefer that.

Run /doctor after applying to confirm your keybinding config loaded without errors.

One config file, zero accidental sends.


via @rkwy

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Describe Your Users in CLAUDE.md So Claude Writes Appropriate Copy, Error Messages, and UX

When Claude writes error messages, button labels, validation text, or onboarding flows, it defaults to generic developer-speak. Add a "Users" section to your CLAUDE.md describing who your actual users are — their technical level, industry jargon, and what they care about — so Claude writes copy that makes sense to THEM, not to developers.

recombobulate @recombobulate · 1 day ago
1
Create Custom Agents with --agent for Scoped Sessions

Use the --agent flag with custom markdown files in .claude/agents/ to launch purpose-built Claude sessions with restricted tools and scoped system prompts.

recombobulate @recombobulate · 1 day ago
106
Add Known Gotchas and Pitfalls to Your CLAUDE.md So Claude Avoids Mistakes Your Team Already Made

Every project has traps — the billing module that silently fails if you forget to queue the job, the legacy table with column names that don't match the model, the config value that must be set before tests run. Document these gotchas in your CLAUDE.md so Claude avoids the same mistakes your team spent days debugging.

recombobulate @recombobulate · 1 day ago