anthropics / anthropics/claude-code

[FEATURE] Allow swapping Enter/Shift+Enter behavior in the VS Code extension's chat input

Open
#95,513 0 comments 0 reactions 0 assignees View on GitHub
area:ide enhancement keybindings platform:vscode
Dominant language
TypeScript
Stars
146k
Forks
23.8k
PR merge metrics
PR metrics pending

Description

### Preflight Checklist

- [x] I have searched [existing requests](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20label%3Aenhancement) and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)

### Problem Statement

In the VS Code extension's chat panel, Enter submits the message and Shift+Enter inserts a
newline. For anyone who regularly composes multi-line messages (e.g. pasting structured
requests, code, or multi-part instructions), the newline action is used far more often than
submit — yet it's the one that requires an extra modifier key, while the rare action (submit)
is on the plain, easiest-to-hit key.

This also causes accidental sends: it's easy to hit plain Enter out of habit while still in
the middle of composing a multi-line message, sending it before it's finished.

This was previously raised in #80892 (closed as "not planned"), which focused on the extension
not honoring ~/.claude/keybindings.json the way the CLI does. This request is narrower: just
the ability to reverse which key does which action in the chat input specifically.

### Proposed Solution

Add a setting (either a dedicated VS Code setting like `claude.chatInput.swapEnterKeys`, or by
having the extension honor ~/.claude/keybindings.json for chat input the way the CLI already
does) that lets users swap the two behaviors: Enter -> newline, Shift+Enter -> submit.

### Alternative Solutions

1. Using an alternative newline shortcut (if one exists, e.g. Ctrl+J) alongside the current
Enter=submit behavior — this only adds a second way to insert a newline, it doesn't remove
the risk of accidentally submitting with plain Enter while still composing.

2. Being more careful not to hit Enter by accident — not a real fix, just constant manual
attention to work around a UI default that fights how the message is actually being typed.

3. Requesting the extension honor ~/.claude/keybindings.json for chat input the same way the
CLI does (this was the ask in #80892) — this would be a broader fix that could also solve
this, but that specific request was already closed as "not planned."

### Priority

High - Significant impact on productivity

### Feature Category

CLI commands and flags

### Use Case Example

_No response_

### Additional Context

Related: #80892 (extension doesn't read ~/.claude/keybindings.json for chat input)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the VS Code extension's chat input handling and its existing support for ~/.claude/keybindings.json; the issue does not name specific files or tests. Trace how Enter and Shift+Enter are mapped, then define and verify a setting or keybinding path where Enter inserts a newline and Shift+Enter submits without changing other input behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
desktop, devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.