Skip to content

Shift+Enter in VS Code terminal extension inserts backslash character instead of newline #37588

Description

@MartinP7r

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).

  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions