Skip to content

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

Description

@ntc2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions