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

  1. Claude Code keybindings.json: Binding shift+enter to chat:newline fails because chat:newline is not a valid action (not listed in the validator's accepted values).
  1. VS Code keybindings.json: Adding a workbench.action.terminal.sendSequence binding for shift+enter to send \n does not help — the terminal interprets it as a submit (Enter) rather than a newline insertion in the chat input.

Suggested Fix

Either:

  • Add chat:newline as a valid action in Claude Code's keybinding system, so users can bind shift+enter to it
  • Or handle Shift+Enter natively 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗