[BUG] /terminal-setup not working, no way to enter multiple lines
Resolved 💬 16 comments Opened May 27, 2025 by empz Closed Jun 9, 2025
Environment
- Claude CLI version: 1.0.3 (Claude Code)
- Operating System: Windows 11 with WSL2 (Ubuntu)
- Terminal: Windows Terminal / Bash
Bug Description
I'm using the VS Code extension in VS Code on WSL (Windows 11). I've run /terminal-setup, the keybindings.json contains the following:
[
{
"key": "shift+enter",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\\\r\n"
},
"when": "terminalFocus"
}
]
Still, when I press Shift+Enter, the message is submitted immediately. No way to enter multiple lines...
16 Comments
Try this " \n" (space important)
terminal apps often ignore or misinterpret a bare newline, especially if it looks like empty input.. Likely due to how (PTY) interprets the sequence compared to actual keystrokes
In short, the space ensures the terminal treats the input as meaningful
Nope, still doesn't work.
Ctrl+Shift+P --> Developer: Toggle Keyboard Shortcuts Troubleshooting
This will open Output tab..
Scenario 1
If above is true but nothing happens --> your keybindings.json is correct and possible 3rd-party extension or other collision is intercepting the keybinding.
Try disable all extensions to rule this out
code --disable-extensionsScenario 2
This suggests that your keybinding probably is incorrectly defined in keybindings.json, placed in the wrong context, or overridden by another command with higher priority.
This is what I get in the output when I press Shift+Enter
I've tried it in an empty profile with just the Claude Code extension. Same thing.
!Image
If it serves any purpose, from my Ubuntu shell inside Windows Terminal (outside VS Code), I need to press Ctrl+Enter to make a new line, Shift+Enter here also submits the message.
Also, the
/idecommand shows "No available IDEs detected".!Image
Thanks, very useful
Try broader -->
However, consider switching 'editor-area terminal' to terminal
Since /ide shows "Not detected..." you prob. get better integration by running Claude Code directly in terminal:
!Image
I've just upgraded to 1.0.6 and the IDE connection is working. Still no way to enter multiple lines... Tried your last suggestion. Also tried launching
claudedirectly from the VS Code terminal instead of by clicking the Claude logo (which seems to be doing just that, launching claude from my default terminal)Did you also try below when swithed to terminal?
{
"key": "shift+enter",
"command": "workbench.action.terminal.sendSequence",
"args": { "text": " \n" },
"when": "terminalFocus"
}
Your setup might be unnecessarily complex
Try working entirely within WSL-connected VSCode instead of launching it from external terminal.
Connect directly to WSL in VSCode:
Ctrl+Shift+P → "WSL: Connect to WSL"
Or click WSL indicator in status bar
Open your project folder directly in WSL-connected VSCode
Use Claude Code extension there - no need for terminal launching
Yes, I've tried that.
My setup is not necessarily complex. It's just a clean Ubuntu LTS via WSL2 on Windows because Claude Code won't run on Windows.
I'm actually switching to work within WSL just to use Claude Code so, really, I've barely did anything with this WSL instance, it's pretty clean.
Would love someone with Windows 11 + Ubuntu via WSL2 to confirm they can input multi-line commands.
I only mentioned that multi-line works when using Windows Terminal instead of VS Code integrated terminal, to see if that helped troubleshoot the issue.
Well, I've just discovered that pressing Alt+Enter does work. Not ideal as I'm not used to it, but okay.
At least something, i have a similar setup and shift+enter is working just fine for me with " \n"
setup:
Also worth trying to open vscode without terminal launch and then connect with WSL direct connection (Ctrl+Shift+P → "WSL: Connect to WSL") (if you're currently launching VSCode from terminal) sometimes mixing different connection methods can affect.
I had the same issue. It seems that VS Code is not picking up
keybindings.jsonin WSL's user directory. I just placed the binding inC:/Users/<user>/AppData/Roaming/Code/User/keybindings.jsonand it works immediately.Oh wow, that actually makes a lot of sense since the VS Code UI runs on Windows, not WSL. It works that way, thank you!
This worked for me: \ + Enter.
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.