Feature Request: configuration option that makes ENTER insert newline instead of submitting prompt

Resolved 💬 17 comments Opened Jun 19, 2025 by ntc2 Closed Aug 22, 2025
💡 Likely answer: A maintainer (bogini, collaborator) responded on this thread — see the highlighted reply below.

Context

There are currently roughly 7 open and 18 closed issues related to users having trouble with the default "submit prompt on ENTER" behavior: https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20submit%20enter (not all, but nearly all of these issues are related to ENTER behavior).

There is a popular issue (currently 25 comments) where someone requested changing the default behavior so that ENTER doesn't submit prompt, and that was closed as wontfix. And here is another issue where someone asked about how to make ENTER insert a newline. And here is a more general issue concerned with multiline prompts. I understand it's not possible to change the default.

Feature Request

**Here I'm asking for the option to configure a non-default behavior, where ENTER inserts a newline without submitting the prompt, and some other sequence (e.g. CTRL+ENTER) is needed to submit the prompt.** Here is another issue requesting the same thing.
(I would also like this option in the web UI for Claude, but I realize that's out of scope here.)

For example, Slack has a configuration option and Mattermost has a configuration option to make ENTER insert newline and CTRL+ENTER send messages. In Claude Code, this could be available via a slash command, e.g.

/multiline-mode on

and when this is set, the ? help could show that CTRL+ENTER sequence is needed to submit the prompt. I would want this config setting to persist between Claude runs, e.g. by being stored in the ~/.claude/settings.json.

Currently Supported Ways to Enter Multiline Prompts

These are workarounds, but don't solve my problem.

Summary of currently supported ways to enter multiline prompts:

  • ALT+ENTER: works for me
  • SHIFT+ENTER: many people report this doesn't work for them and there is a tracking issue here; it doesn't work for me
  • running /terminal-setup first may help, but it doesn't help for me
  • insert backslash (\\) at end of line before ENTER: works for me

However, note that **none of these are very ergonomic, since they all require extra work for every newline in the prompt.**

View original on GitHub ↗

17 Comments

DwayneSmurdon · 1 year ago

shift-enter++ That'd be my choice.

simen · 1 year ago

shift-enter is what I expected and keep hitting based on muscle memory

cpcdoy · 1 year ago

I can confirm that the key binding added by /terminal-setup in keybindings.json for Shift + Enter on VS Code doesn't work for me either. Alt + Enter and \ both work.

Support for Shift + Enter would be ideal

ntc2 · 1 year ago

To clarify, there are a few comments mentioning SHIFT+ENTER to insert newline without submitting prompt: that is a different issue, e.g. tracked here. This issue: I want an option to make plain ENTER insert a newline without submitting the prompt. The sequence to submit the prompt could then be CTRL+ENTER.

convcha · 1 year ago

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.

woldaker · 1 year ago

I am also in this camp. Please let us turn off Enter as automatic-submit. I'd much prefer a key combination in order to submit commands, considering that it wastes tokens if you do it prematurely. Shift+Enter would be fine, but that didn't work for me, either.

cjrh · 1 year ago

CopilotChat.nvim uses CTRL-s to submit the prompt (mnemonic is "submit").

maraoz · 11 months ago

Shift+Enter camp here.

Rationale: muscle memory from ChatGPT, Claude AI, WhatsApp web, Signal desktop, Discord, Slack, Telegram web, Telegram desktop, Skype, Twitter DMs and almost every single "chat" app in the whole wide world...

cjrh · 11 months ago

I noticed recently using Claude Code within a Jetbrains term, Shift-Enter now does work for newlines (and Enter for submit).

evansgp · 11 months ago

i would genuinely upgrade to max20x for a month if i could use shift-enter to do multiline prompts within the cli. an opt-in option is totally fine.

(i run the cc cli in alacritty on linux with zed as my ide, so using iterm2 or vscode/jetbrains is not an option for me)

vizcay · 11 months ago

Is a pain not being able to configure this.. Shift-Enter isn't working from me either from out of the box (I'm not in VSCode).

bogini collaborator · 10 months ago

Thank you for this feature request! While Claude Code doesn't currently have a built-in configuration option to change the default ENTER key behavior, you can achieve similar functionality by following the steps in https://docs.anthropic.com/en/docs/claude-code/terminal-config#line-breaks

ntc2 · 10 months ago

@bogini looking at that page, I don't see where it describes achieving similar functionality. There is the "Keyboard shortcut: Set up a keybinding to insert a newline", but I'm not sure what that means? Is it suggesting that I can setup a shortcut using some other app that inserts \n, but is not ENTER, and that Claude will treat that differently from ENTER?

cjrh · 10 months ago

@bogini To get SHIFT-ENTER to insert newlines using Claude Code within Kitty Term, one can add this to their ~/.config/kitty/kitty.conf:

map --when-focus-on title:claude shift+enter send_text normal,application \n

What is the process to get this added to the doc page you linked?

beldaz · 10 months ago

The ability to configure Claude Code to make enter create newline instead of submitting would be extremely useful. Having spent considerable time on a variety of similar tools, I've found value in writing detailed prompts to achieve good outcomes one-shot results. I note that Amp Code has default behavior to Enter=newline for just this reason.

I disagree with arguments about making behavior consistent with chat apps like Slack, etc. - Claude Code isn't a chat app, even if it can look like one at first glance. If you mistype something in Slack you can amend your message after, or clarify in a subsequent message. In CC, a premature submission wastes time and tokens.

jmcvetta · 10 months ago

@bogini Completely agree with @beldaz. The default Enter behavior is inappropriate for the use case, where one is often typing and editing long prompts.

I also note that, in the terminal on Ubuntu at least, the default behavior is not even consistent with Slack. It's completely unique behavior that requires learning new muscle memory. It much worsens the Claude Code user experience and frequently results in premature submissions.

What exactly is the intention behind the very strange & inconvenient default behavior?

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.