Insert a new line with Enter key instead of sending a message
Open 💬 26 comments Opened Jun 13, 2025 by tmokmss
I'd like to have an option to insert a new line with Enter key instead of sending a message. In CJK languages enter key is used to confirm the input and the current key binding very often leads to an incomplete message mistakenly sent to claude, which is annoying.
Currently we can only add new line with shift+enter by /terminal-setup command, but it does not support enter to add new line.
26 Comments
Just realized I created a duplicate of your issue here: https://github.com/anthropics/claude-code/issues/2335.
I really want this option!
It’s super inconvenient for speakers of languages like Japanese, where we use Enter a lot when writing, to have it submit with Enter.
I would love to have this, too. Sooooo many half written prompts sent accidentally...
I just want a config option to invert the
return/modifier+returnbehavior, like Zed'suse_modifier_to_send:https://zed.dev/docs/ai/agent-settings#modifier-to-send
Yeah, I think some momentum around Cmd-enter (Mac) and Ctrl-Enter (elsewhere) would be great. This also matches with an option that Slack provides, fwiw, so it's not far from being a convention in the world where people do a lot of messaging.
Yeah, this is very backwards and I get you have users who only use Claude and got used to it... but this is a huge issue for those of us who have muscle memory for the other way.
I really hope you can give us proper Ctrl+J Ctrl+M ie: Line Feed.
I'm so used to being able to press [Enter] to end a line, that I constantly accidentally press it and Submit.
Then, the inevitable stream of NSFW words start flying and I have to press the stop button, copy my text, paste it in and start over.
https://togetter.com/li/2669795 (Japanese)
https://internet.watch.impress.co.jp/docs/yajiuma/2089576.html (Japanese)
https://b.hatena.ne.jp/entry/s/internet.watch.impress.co.jp/docs/yajiuma/2089576.html (Japanese)
https://b.hatena.ne.jp/entry/s/togetter.com/li/2669795 (Japanese)
https://github.com/catnose99/use-chat-submit
https://zenn.dev/catnose99/articles/nani-translate?locale=en#sending-with-ctrl-%2B-enter
This would also help prevent credentials or other secure information being sent accidentally. Cutting and pasting a connection string with the password in it, meaning to remove the password and add "enter password here" , but accidentally hitting enter before that happens.
Claude suggests the following:
When filing, it would help to mention:
The goal: swap Enter (newline) and Shift+Enter (submit) to prevent accidental credential submission
What was tried: keybindings.json with enter: "chat:newline" and shift+enter: "chat:submit"
Why it fails: terminal sends CR for both Enter and ctrl+m, which the docs flag as non-rebindable
Suggested fix: either honor the enter keybinding override despite the ctrl+m alias, or add a "safe submit" mode where Enter never submits
Please implement this feature. I use Claude Code via an SSH connection, and it treats Shift+Enter the same as Enter. I have to keep using that awkward /\+Enter combination, but it's just not possible to do reliably due to decades of learned muscle memory for stuff like this. Being able to set Enter to always be a newline would definitely help here. And then doing /\+Enter to actually send the prompt would be fine.
Yep, echoing what everyone here has said - this needs to be added! I made a duplicate of this issue here:
https://github.com/anthropics/claude-code/issues/38634
Slack has this feature, and I love it.
Please fix. Right now the Enter button is almost like a bomb trigger and often we just want to enter a new line or copy paste data into the text box. Having the option to turn off Enter as submit immediately would greatly increase usability of the app.
Agreed, it is really annoying accidentally submitting a prompt I'm midway through writing. I know you can cancel and edit what you were writing, but it would be a huge improvement to UX if this just wasn't a thing to deal with at all.
Now that Claude is open source, would you accept a pull request adding this feature? 🫣
+1 on this. Heavy iTerm2 user on macOS. I frequently hit Enter prematurely when composing multi-line prompts. This is the same problem Slack solved years ago with a "require Cmd+Enter to send" toggle.
I also tried setting
"editorMode": "vim"hoping that normal mode would prevent accidental sends, but Enter submits regardless of vim mode -- so it adds friction (must pressito type) without solving the actual problem.A configurable "Enter inserts newline, Cmd+Enter sends" option would make Claude Code significantly more usable for users who regularly compose multi-line prompts.
I'd like to ask an option to enable this feature only in vim insert mode.
The workaround of repeatedly typing shift + Enter is quite painful for me.
This is a major reason I use OpenCode Vim (https://github.com/leohenon/opencode-vim) which supports the feature.
I noticed the feature specifically in Vim insert mode was already requested at:
https://github.com/anthropics/claude-code/issues/2588
Echoing the "slack has this option" (shift-enter to send, enter opens newline). (macOS/iTerm2)
Please make this configurable. Pressing Enter to create a new line in a multi-line text field had been a long-standing convention since the dawn of computing. I'm not sure I'm capable of undoing decades of muscle-memory just to use your software.
I suspect this could be an accessibility issue as well, since dictation software may very well simulate Enter/Return key presses to insert a newline into a text field.
This issue affects a significant portion of the global developer population. The following languages require the Enter key to confirm IME composition:
Total is over 19,000,000 out of ~27,000,000 global developers, meaning roughly 69% of all developers worldwide are affected by this issue. I’d like the problem resolved where the enter key alone cannot be rebound via keybindings.
It would be very helpful to require ⌘ + Enter to send prompts. When enabled, multiline prompts require ⌘ + enter to send. It would be great to have that feature in Claude Code and Claude.ai.
I really would appreciate this. Related:
https://github.com/anthropics/claude-code/issues/60156
I'd like this too. I tried to do this using
~/.claude/keybindings.jsonbut it wouldn't work and had to revert. Claude added this bug for me: https://github.com/anthropics/claude-code/issues/60156I wholeheartedly agree with all comments that this needs to be available ASAP. I can't count how many times I unwillingly sent an incomplete message and had to stop, copy-paste, complete, resend. Waste of time and flow.
Thanks!
Hello, I would love to keep paying for claude but i do need it to be user friendly. This is a very important feature, as I try to give specific instructions which requires multiple lines.
A stop gap solution would be a way to just prevent enter sending a message, I would be happy to click on the send icon in the meantime.
I too want this feature. Slack has it. Enter -> newline, ⌘+Enter -> submit prompt.
This would behave exactly like this github message box, I'm about to hit ⌘+Enter to submit....
It's genuinely frustrating to have to rely on Shift+Enter just to insert a newline — it breaks a decades-old, universal text-input convention that users instinctively expect by default and most applications (purely chat applications) have this option.
What's especially puzzling is that this exact behavior (configurable Enter-to-send vs. Enter-for-newline) has already been implemented and shipped in the VS Code extension's settings. If this was already deemed sensible and approved for the VS Code GUI, it's unclear what the "logic" is for why the same feature needs to be re-litigated here instead of simply being brought over to Claude Code.