Claude Code✓ Confirmed in official docsAdded Oct 24
How to stop Ctrl+J from adding a new line in the Claude Code VS Code extension
In the Claude Code VS Code extension's prompt box, Ctrl+J inserts a new line, so a VS Code shortcut you bound to Ctrl+J doesn't fire there. Since v2.1.309 the extension reads Claude Code's keybindings.json, and unbinding the key there leaves Ctrl+J to VS Code and the OS.
- Update the Claude Code extension to 2.1.309 or later in the Extensions view.
- In
keybindings.jsonin your Claude Code configuration directory, set"ctrl+j"tonullin aChatblock. The directory is~/.claudeunless you moved it withCLAUDE_CONFIG_DIR. If the file doesn't exist, create it with exactly this content.
{
"bindings": [
{
"context": "Chat",
"bindings": {
"ctrl+j": null
}
}
]
}
If the file exists, add the Chat block to the bindings array. If a Chat block is already there, add "ctrl+j": null to it, and if it already has a "ctrl+j" line, change only its value to null.
- Save and press Ctrl+J in the prompt box. If it still adds a line, run Developer: Reload Window from the Command Palette. If that doesn't help, open Claude Code: Show Logs, find the warning that includes
Ctrl+J in the chat input still inserts a newline, and fix the problem it reports.
Claude Code in the terminal reads the same file, so Ctrl+J stops adding a new line there too.
Sources
Get notified when a new tip lands
Tip alerts only go out in the app. Install it and turn notifications on.