Shift+Enter in VS Code terminal extension inserts backslash character instead of newline
Resolved 💬 3 comments Opened Mar 22, 2026 by MartinP7r Closed Mar 26, 2026
Description
In Claude Code's terminal-based extension for VS Code, pressing Shift+Enter inserts a \ (backslash) character alongside the newline, instead of just inserting a newline.
Option+Enter works correctly (newline only, no backslash).
Expected Behavior
Shift+Enter should insert a newline in the chat input without any extra characters, matching the behavior of Option+Enter.
Attempted Workarounds
- Claude Code
keybindings.json: Bindingshift+entertochat:newlinefails becausechat:newlineis not a valid action (not listed in the validator's accepted values).
- VS Code
keybindings.json: Adding aworkbench.action.terminal.sendSequencebinding forshift+enterto send\ndoes not help — the terminal interprets it as a submit (Enter) rather than a newline insertion in the chat input.
Suggested Fix
Either:
- Add
chat:newlineas a valid action in Claude Code's keybinding system, so users can bindshift+enterto it - Or handle
Shift+Enternatively in the terminal UI to insert a newline without the backslash artifact
Environment
- Claude Code VS Code extension (terminal-based)
- macOS (Darwin 25.3.0)
- Fish shell
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗