Shift+Enter Line Break Fails in VSCode Claude Extension on macOS
Resolved 💬 19 comments Opened Jun 6, 2025 by vzegna Closed Jan 9, 2026
Bug Description
I cannot find a way to go new line with shift+enter in VSC on Mac. I tried everything. I obviously ran the /terminal-setup command. The only way to go new line in claude in VSC is alt+enter. However, if I use claude in PyCharm or iTerm2, shift+enter works totally fine.
Environment Info
- Platform: macos
- Terminal: vscode
- Version: 1.0.16
- Feedback ID: f675a831-df8a-4243-8b15-5e50a0269265
Errors
[{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at WZ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:654:3921)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11794\n at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17190)\n at pJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10940)\n at iP (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10021)\n at n6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:14133)","timestamp":"2025-06-06T17:14:47.392Z"}]
19 Comments
When using CC from the command line I use \ + ENTER. Not sure if that helps but putting out there. (That was a backslash)
👍 I am experiencing the same issue.
I was having the same issue and ran
/terminal-setupto resolve itI have the same issue.
I ran
/terminal-setup, which gave meFound existing VSCode terminal Shift+Enter key binding. Remove it to continue..I removed it, before re-running
/terminal-setup. This gave meInstalled VSCode terminal Shift+Enter key bindingand createdin my
keybindings.jsonfile, but it did not solve the issue.FYI, I'm not using the VSCode's integrated terminal. The problem arises with both
zsh(withpowerlevel10kandoh-my-zsh) andbash(vanilla). I'm using Claude Code 1.0.35.---
Let me add that after
/terminal-setupaddedto the
keybindings.json, re-running it raisesFound existing VSCode terminal Shift+Enter key binding. Remove it to continue., which does suggest there's an issue.Same problem for me! The
/terminal-setupcommand does not fix it. It just keeps adding the key binding, then saying to remove it, then adding it, then saying to remove it..... forever. Typing\enteris terribly unintuitive and prone to error. I just want to typeshift+enterlike many other typing interfaces, please!I found the settings.json line that was causing the issue:
Remove this, and you should be good to go.
@vzegna Thanks for the suggestion! Didn't work for me.
@vzegna Thanks, but that setting was already removed from my VSCode settings and the problem still persists. Hopefully there is another solution coming from the Claude Code team.
The only alternative solution is the following, but it's a BRUTE FORCE approach:
You will probably have to reset things like the Color Theme, font sizes and so on, but this process fixed the issue for me.
I am now able to go to a new line in Claude (and in the Terminal in general) by using either Shift+Enter and Option+Enter.
@vzegna That doesn't work for all systems. I spent a ridiculous amount of time on this. I use Mac and WSL2 and the only thing that actually works across all platforms is adding the following to VSC's
keybindings.jsonfile:On WSL2, something completely blocks all attempts to modify the key bindings using
bindor any other system tools. I tried many different approaches, but the two JSON objects above are the only thing that worked.This worked for me. Thanks!
If anyone is using VS Code - Insiders build, this may save them some grief. I was experiencing the same issue as described:
/terminal-setupin Claude Code from a VS Code terminal.~/Library/Application\ Support/Code/User/keybindings.json.Solution
After debugging with "Developer: Toggle Keyboard Shortcuts Troubleshooting" I saw that Shift-Enter wasn't matching any 'when' clauses.
When I used "Preferences: Open Keyboard Shortcuts (JSON)" I was surprised to see that the file was empty other than the generic header.
Only then did I realize I was looking at the Insiders Build config
~/Library/Application\ Support/Code\ -\ Insiders/User/keybindings.json!It turns out that Claude should have written to
~/Library/Application\ Support/Code\ -\ Insiders/User/keybindings.json. It didn't realize that I was using VS Code - Insiders. So it wrote to~/Library/Application\ Support/Code/User/keybindings.json. But this had no effect for me, running Insiders.Copying the rule into the Insiders Build config file works!
It would be nice if Claude Code would detect itself running from within the Insiders Build and install to the right path.
This works for me as well, I removed this setting from
~/Library/Application Support/Code/User/settings.jsonand it started working. Just for sake of completeness, the~/Library/Application Support/Code/User/keybindings.jsonlooks like this:oh my god thank you did i've been having this issue for MONTHS!
Use this, it doesn't trail backslash
Funnily Opt + Enter works
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.
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.
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.