[BUG] Shift+Enter does NOT newline 🔥 — '/setup-terminal' creates binding but doesn't work (VSCode WSL Ubuntu)

Resolved 💬 16 comments Opened Jun 30, 2025 by michellepace Closed Aug 20, 2025

_It's a tiny bug given what Claude Code can do, but a 🔥 big problem._

Environment

  • What: Claude Code
  • Operating System: Windows 10 running VSCode WSL Ubuntu connection (same for Cursor)
  • Terminal: Claude Code terminal

Bug Description

Shift+Enter does not create a new line in terminal

Steps to Reproduce

  1. Run /terminal-setup
  2. Restart VSCode (WSL Ubuntu connection)
  3. Confirm new binding is in ~/.config/Code/User/keybindings.json

```json

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

  1. Ensure I am in the Claude terminal, run claude from bash
  2. Write "please work now", press shift+enter, this still submits the message and does not create a new line

Expected Behaviour

New line whilst writing in Claude code terminal

Actual Behaviour

Submits message and does not create new line

!Image

Additional Context

  1. "Alt+Enter" makes a new line
  2. "\" makes a new line
  3. "Shift+Enter"... doesn't make a new line
  4. Claude Code suggested the below, I tried both. Neither worked.
🔥 Main Issue: Commands to Skip Shell Setting

The keybinding exists but VSCode terminal is consuming the Shift+Enter keystroke before it reaches 
your keybinding. You need to add the command to VSCode's "Commands to Skip Shell" setting.

🍀 Solution Steps:

"Commands to Skip Shell" explained:

When you press a key in VSCode's integrated terminal, there are two possible handlers:
1. The shell (bash, zsh, etc.) - handles the keystroke
2. VSCode - handles the keystroke via keybindings

By default, most keystrokes go to the shell first. "Commands to Skip Shell" tells VSCode: 
"Don't send this keystroke to the shell, handle it with VSCode keybindings instead."

For your use case:

- Shift+Enter: You want VSCode to handle this (send \\\r\n for line continuation)
- Enter: You want the shell (Claude Code) to handle this (submit message)

Why you need "Commands to Skip Shell":

Without it:
1. You press Shift+Enter
2. Shell gets the keystroke first
3. Shell might ignore it or handle it differently
4. Your VSCode keybinding never fires

With it:
1. You press Shift+Enter
2. VSCode intercepts it before the shell sees it
3. VSCode runs your keybinding (workbench.action.terminal.sendSequence)
4. The sequence \\\r\n gets sent to the shell
5. Shell interprets this as "continue this line"

So adding "workbench.action.terminal.sendSequence" to Commands to Skip Shell should 
make your Shift+Enter work for multi-line input while keeping Enter for submission.

View original on GitHub ↗

16 Comments

VincentPeters · 1 year ago

+1 i have the exact same problem

jhult · 1 year ago
sirmalloc · 1 year ago

Try this instead:

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

Option+Enter always works for me on macOS, so I captured the keycodes and it sends an Escape (\^[) and a Linefeed (\u000A). Updating the keybinding above makes Shift+Enter work identically to Option+Enter in VSCode on macOS.

edsonbrusque · 12 months ago

There's too much multi-line inconsistencies between platforms.

Claude Code on Windows: Says "Tip: Press Shift+Enter to send a multi-line message" but Shift+Enter actually doesn't work. Ctrl+Enter sends newline. Alt+Enter toggles fullscreen.

Claude Code on WSL terminal: Shift+Enter sends the message. Ctrl+Enter sends newline. Alt+Enter toggles fullscreen.

Claude Desktop on Windows: Ctrl+Enter sends the message. Shift+Enter and Alt+Enter sends newline.

Claude on Web: Ctrl+Enter sends the message. Shift+Enter and Alt+Enter sends newline.

Claude on VS Code with it's key bindings is another mess.

I would preffer that Enter just creates a newline. Just like this box editor here on GitHub.

And use Ctrl+Enter to send. Also, just like this box editor here on GitHub.

This is much more natural. Any text editor does a newline when Enter is pressed. This is what most people are used too.

Chat applications, like WhatApp broke that rule, reverting things. On WhatsApp, for example, Shift+Enter, Ctrl+Enter, Alt+Enter can be used for newline while Enter alone would send the message. I think this is bad UI design.

michellepace · 11 months ago

Thank you @sirmalloc for your suggestion. I tried it but I'm afraid it did not work. I'm stuck with "\" for new lines. But thank you.

vitmantug · 11 months ago
Try this instead: `` [ { "key": "shift+enter", "command": "workbench.action.terminal.sendSequence", "args": { "text": "\^[\u000A" }, "when": "terminalFocus" } ] `` Option+Enter always works for me on macOS, so I captured the keycodes and it sends an Escape (\^[) and a Linefeed (\u000A). Updating the keybinding above makes Shift+Enter work identically to Option+Enter in VSCode on macOS.

OMG you're a GOD! Thank you so much!

That solved my problem on Windows + WSL + VSCode terminal

ben-alkov · 11 months ago
vitmantug · 11 months ago
ben-alkov · 11 months ago

If you don't nuke all of the other SHIFT+ENTER mappings, it will not work.

vec715 · 11 months ago

same issue, still does not work with Windows Terminal (Powershell 7) and vscode. even with suggested changes in https://github.com/anthropics/claude-code/issues/2754#issuecomment-3064554102

ben-alkov · 11 months ago
Windows Terminal (Powershell 7) and vscode

What does this mean, exactly? Are you running claude-code in a separate Windows Terminal window/tab?

michellepace · 11 months ago

Hi @ben-alkov no I’m running Claude Code via claude in my cursor terminal with zsh as my shell. It’s just a detail I should not have included.

ben-alkov · 11 months ago
same issue, still does not work

🤔 Have you tried what's in the gist I posted (removing existing mappings for SHIFT+ENTER)?

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/1251
  2. https://github.com/anthropics/claude-code/issues/1262
  3. https://github.com/anthropics/claude-code/issues/5326

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] · 11 months ago

This issue has been automatically closed as a duplicate of #1251.

If this is incorrect, please re-open this issue or create a new one.

🤖 Generated with Claude Code

github-actions[bot] · 10 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.