[BUG] /terminal-setup command doesn't work in VSCode

Resolved 💬 16 comments Opened May 23, 2025 by softwarerockstar Closed Jan 18, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [X ] Other: Claude Code in VSCode
  • Claude CLI version: 1.0.2 (Claude Code)
  • Operating System: Windows 11
  • Terminal: WSL

Bug Description

  • /terminal-setup command doesn't configure Shift+Enter for new lines
  • Shift+Enter still sends messages instead of creating new lines

Steps to Reproduce

  1. In VSCode open a new WSL Terminal
  2. Run claude
  3. In Claude Code enter /terminal-setup
  4. Type some text followed by Shift+Enter

Expected Behavior

Shift+Enter should create new line

Actual Behavior

The text you typed is sent, just like if you hit the Enter key

Additional Context

/terminal-setup command is documented here:

https://docs.anthropic.com/en/docs/claude-code/cli-usage

View original on GitHub ↗

16 Comments

Matthew-Herman · 1 year ago

Also having this issue with Claude Code 1.0.22

danielhont · 1 year ago

Same issue (VS Code WSL: Ubuntu-24-04).

rublev · 10 months ago

man i'm still getting this on 1.0.102 (Claude Code) :(

ahmedebid · 10 months ago

This is now also the case on Cursor. The interesting thing is that it used to be working fine before. Not sure what changed.

briandonahue · 10 months ago

Yep. 1.0.113 made plan mode go away on shift-tab now 1.0.115 took away shift-enter for new line 😕

briandonahue · 10 months ago

Update: this seems to primarily be an issue when you open Claude Code with the Cursor (haven't tested in VS) extension button at top right. If you just launch claude from the in-app terminal, shift-enter works for me. I updated the key binding based on this comment to get rid of the extra \ but either works when launched in a regular terminal. I wonder if the extension terminal is no longer considered terminalFocus so the key binding is not executing. So - could be an extension bug and not a direct Claude Code bug.

redzonej · 10 months ago

Has anyone actually gotten this to work on Windows with WSL or WSL2 in VSCODE and/or CURSOR?

I'm on Windows 11 WSL2 with Ubuntu and Cursor and Shift+Enter worked for months until the latest update. I've tried all the suggestions across loads of these issues pages and none of the adjusted keybindings have worked.

For example, this was highlighted as a fix in several places but place in either keybindings.json (windows local or ubuntu locall) or BOTH none of them work:

[
  {
    "key": "shift+enter",
    "command": "workbench.action.terminal.sendSequence",
    "args": { "text": "\^[\u000A" },
    "when": "terminalFocus"
  }
]
rublev · 9 months ago

What a piece of garbage. Back to neovim it is. Trash all across the board!

briandonahue · 9 months ago
Has anyone actually gotten this to work on Windows with WSL or WSL2 in VSCODE and/or CURSOR?

@redzonej Per my comment above, this seems to do with the context of the Claude panel that is opened using the Claude key command or button in Cursor not being an actual terminal so the binding doesn't work. I tried a few things to figure out a way to get it to work but came up empty (definitely not an expert with VS Code context/binding stuff).

A workaround is to open a terminal, drag it to the same location as your Claude panel, launch claude and it will still connect to the IDE (you can always run /ide if not) and work the same way. A couple extra steps but at least you don't have to deal with constantly accidentally triggering prompts when you didn't mean to 😄

github-actions[bot] · 7 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

holdenmatt · 7 months ago

I did some testing today on macOS with latest versions of Cursor (v2.1.50) and VSCode (1.106.3)

For me, Shift+Enter:

  • does NOT work in Cursor in terminals in the "Editor Area" (where the Claude Code IDE extension runs)
  • DOES work in Cursor in terminals in the "Terminal Area"; works in both places in VS Code

I initially thought this was a claude code bug, but I see the same behavior with the codex and factory droid CLIs.

Reported to the Cursor team here: https://forum.cursor.com/t/shift-enter-blocked-in-cursor-editor-area-terminals-but-not-vs-code/145597

jeremyk · 7 months ago

I figured out why it wasn't working for me and maybe this will help someone else.

I have profiles enabled on VS Code and it doesn't look at the default location that claude writes keybindings to.

TLDR; Open the command palette -> JSON keybindings to get the correct file. Copy the binding that claude creates there and 🤞.

Good luck!

seanGSISG · 6 months ago

@jeremyk you finally cracked it for me\! However, looking for just keybindings is slightly misleading.

After months of research and debugging, I finally have a solution proven to work on multiple machines.

Environment:

  • OS: Windows 11
  • Subsystem: WSL (Ubuntu 24.04)
  • IDE: Visual Studio Code

❌ The Common Pitfalls

  1. Wrong File: Claude Code's terminal-setup command configures the file inside WSL (/home/user/.config/...). You need to edit the file on the Windows host.
  2. Wrong Hex Code: It also uses this hex code \^[\r does not work in this context. You must use \^[\u000A.

✅ The Solution

  1. Connect to your WSL distro in VS Code.
  1. Press CTRL+SHIFT+P
  1. Type preferences: open key and select Preferences: Open Keyboard Shortcuts (JSON).

(Note: Do not select the "Default" one)

<img width="931" height="164" alt="Image" src="https://github.com/user-attachments/assets/644835f7-f435-4fb4-9669-dc7fe4a8ff32" />

  1. This opens the correct configuration file (located in %AppData% on Windows).
  1. Paste the following configuration:

<!-- end list -->

[
    {
      "key": "shift+enter",
      "command": "workbench.action.terminal.sendSequence",
      "args": { "text": "\^[\u000A" },
      "when": "terminalFocus"
    }
]

-----

⚡ TLDR; Quick Fix

  1. While connected to WSL, run the command palette (Ctrl+Shift+P).
  2. Select Preferences: Open Keyboard Shortcuts (JSON).
  3. Add this specific block (note the \^[\u000A text arg):
[
    {
      "key": "shift+enter",
      "command": "workbench.action.terminal.sendSequence",
      "args": { "text": "\^[\u000A" },
      "when": "terminalFocus"
    }
]

Restart VS Code and you now too can stop using the \ then Enter method and constantly accidentally sending messages 😆

github-actions[bot] · 5 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.