[FEATURE] Ctrl+Enter for newlines conflicts with standard app conventions - request customizable shortcuts

Open 💬 29 comments Opened Aug 4, 2025 by shorn

## Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude Code CLI
  • Claude CLI version: 1.0.67 (Claude Code)
  • Operating System: Windows 10
  • Terminal: Windows Terminal

## Feature Request Description
Request ability to customize keyboard shortcuts for newline insertion in Claude Code interactive mode. Currently, Ctrl+Enter is used to add newlines, but this
conflicts with standard application conventions where Ctrl+Enter is typically used for "submit" functionality.

## Current Behavior

  1. Open Claude Code in interactive mode
  2. Type a message
  3. Press Ctrl+Enter to add a newline
  4. Press Enter to submit the message

## Requested Behavior
Allow users to configure alternative keyboard shortcuts for newline insertion, such as:

  • Shift+Enter for newlines (matching standard conventions)
  • Enter for submission
  • Or allow users to swap the current Enter/Ctrl+Enter behavior

## Problem Statement
The current Ctrl+Enter for newlines goes against established conventions in most applications where Ctrl+Enter means "submit" (email clients, chat applications,
web forms, etc.). This creates muscle memory conflicts that cause:

  1. Accidental submissions in other tools: Users trained on Claude Code's shortcuts inadvertently send incomplete emails, messages, or forms in other

applications when attempting to add newlines

  1. Workflow disruption: Constant mental context switching between Claude Code's unique shortcuts and standard application behavior
  2. User safety issues: Mis-sent emails and incomplete form submissions can have professional consequences

## Additional Context

  • The \ + Enter workaround exists but is non-standard and unintuitive
  • /terminal-setup only works for iTerm2 and VS Code, not Windows Terminal
  • This affects user productivity and creates potential for embarrassing mistakes in professional communications
  • Standard convention across most applications (including claude web): Enter = submit, Shift+Enter = newline

View original on GitHub ↗

29 Comments

fsjn · 11 months ago

i agree this is very native for common users to have Shift+Enter hotkey for newlines

shorn · 11 months ago

It's really surprising to me how quickly ctrl+enter for newlines in claude-code entered my muscle memory for "next line"(I guess because i micro-manage claude a lot. Though I don't even need to put newlines in - claude knows what I mean! i just can't bring myself to cram my messages it all on one line.
It's resulted in me sending quite a few confusing emails to folks lately, with literally only a single line of content because gmail takes ctrl-enter to mean "send it now".

nrgbistro · 11 months ago

Strongly agree, shift+enter is the standard convention and this inconsistency is leading me to very often send prompts to claude before they're complete. Please consider making a toggle in the settings!!

Jinkxed · 11 months ago

Seriously. My number one pain point using Claude Code is this.

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/2335
  2. https://github.com/anthropics/claude-code/issues/2054
  3. https://github.com/anthropics/claude-code/issues/1758

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

shorn · 11 months ago

I prevented auto-close because the 1. and 2. are about the behavior of Enter. 3. seems to be about supporting Shift+Enter in some terminals where it doesn't work, or the submitter doesn't like the implementation, not sure?

With regard to this use, c-c works fine with Shift+Enter, it just does the same thing as Enter already does in my env (windows terminal).

That said, it's clear from the various issues raised about how all these keys work (there's more than just those 3 linked above), that maybe c-c could benefit from some kind of UX pass with regard to input processing. For example, for myself, I agree with the people who submitted 1. and 2. - my prompts are always longer than one line. But on the other hand, i find myself very frequently writing prompts in a scratch file or a prompt file, because if I'm writing a long multi-line prompt at the CLI, an accidental press of ESC will wipe out everything I typed.

Happy for this issue to be closed if that's already happening.

muammil · 11 months ago

Am also supporting this issue

When using Claude in Android Studio’s terminal, Shift + Enter works for inserting a new line. However, in PyCharm’s terminal, Shift + Enter and Ctrl + Enter both execute the command instead of creating a new line.

Currently, the only way to insert a new line is by using \ + Enter, which is inconvenient. Having to remember different shortcuts between IDEs is a pain point and both are JetBrains IDEs

Please add an option to customize the “new line” shortcut in the terminal

tzengshinfu · 11 months ago

If you have PowerToys installed, you may try remapping with Keyboard Manager as a workaround.

<img width="561" height="254" alt="Image" src="https://github.com/user-attachments/assets/0b9f93d5-57a0-493b-98d5-9ca229dd0da0" />

taniko · 9 months ago

We need the Enter key configuration feature, like Slack has.
https://slack.com/help/articles/115005523006-Set-your-Enter-key-preference

etirta · 8 months ago

I'd also benefit from configurable keybindings, though with a different preference. Coming from web-based chat apps (Slack, Discord, ChatGPT), I'd like:

  • Enter → newline
  • Ctrl+Enter → submit

This is the opposite of the current behavior, but matches the pattern used in most modern chat applications where Enter allows you to compose multi-line messages naturally.

My use case: Running Claude Code in tmux, where Shift/Option modifiers can be awkward. The \ + Enter workaround breaks muscle memory from other chat interfaces.

A configurable setting like this would satisfy both our needs:

  {
    "keybindings": {
      "newline": "Enter",      // or "Shift+Enter", "Ctrl+Enter", etc.
      "send": "Ctrl+Enter"     // or "Enter"
    }
  }

+1 for making this configurable rather than changing the defaults!

kinglycodes · 8 months ago

I absolutely agree with @etirta . This is why I moved from Windsurf to Claude Code, because Windsurf don't listen to the users since month about this topic. I hope Anthropics will do and provide us a solution.

boke0 · 8 months ago

When writing in Japanese, we need to press Enter after each word to confirm the input, which makes unintended submissions more likely under the current design. I sincerely hope that supporting Ctrl (or Cmd) + Enter for submitting messages will be considered.

github-actions[bot] · 7 months ago

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.

jaroslawjanas · 7 months ago

This issue is still very much a problem and occurring.

Storyyeller · 6 months ago

This drives me crazy and means constantly truncated prompts mis-sent in Claude Code, hampering usability.

alex-hunt-materialize · 6 months ago

The defaults are ridiculous. I pretty much never have single line prompts. Having this be configurable is a must.

That this is also an issue when in insert mode with vim bindings is even more egregious.

alex-hunt-materialize · 6 months ago

@Jinkxed If I'm reading the changelog correctly, that sounds like an unrelated improvement, that we won't need to inject configuration into our terminal configs to get the current Shift+Enter behavior of inserting a newline. This issue is about being able to reconfigure the keyboard shortcuts to be able to map other combinations, such as having Enter be a newline and Shift+Enter submit the prompt (ie: the opposite of what we have now).

marcindulak · 6 months ago

Reconfiguration of the newline keyboard shortcut would be optimal, because some people on MacOS got used to Option+Enter, and don't like the current Shift+Enter https://github.com/anthropics/claude-code/issues/16764.

As a side note, I hope this issue won't get closed soon due to "60 days of inactivity". The autoclose bot is currently going around and closing issues that contain active human dicussions https://github.com/anthropics/claude-code/issues/16497.

tzengshinfu · 6 months ago

+1(Keep this post active)

assylias · 5 months ago

For Windows terminal:

  • SHIFT + Settings to edit the Windows terminal settings.json file
  • Add an action
    "actions": 
    [
        {
            "command": 
            {
                "action": "sendInput",
                "input": "\n"
            }
        }
    ],
Power2All · 5 months ago

Doesn't work.
Works fine in the desktop app with Claude Chat, but Claude Code doesn't.

burqen · 3 months ago

I have the same problem on MacOS. I have so much resistance towards using Claude CLI because of this issue.
Shift+Enter -> Newline is industry standard everywhere. Please fix this 🙏

yurukusa · 3 months ago

Ctrl+Enter vs Shift+Enter behavior depends on your terminal's keyboard protocol support. Here are ways to customize:
Workaround 1 — Remap in your terminal:
Most terminals let you remap key combinations:

  • iTerm2: Preferences → Profiles → Keys → Key Mappings → add Ctrl+Enter → send escape sequence \n
  • Kitty (kitty.conf):

``
map ctrl+enter send_text all \r
``

  • Ghostty: Key remapping in config file
  • WezTerm (wezterm.lua):

``lua
config.keys = {
{ key = 'Enter', mods = 'CTRL', action = act.SendString '\n' },
}
``
Workaround 2 — Use keybindings.json:
Claude Code supports custom keybindings:

// ~/.claude/keybindings.json
[
  {
    "key": "ctrl+enter",
    "command": "newline"
  }
]

(Check /help for the exact keybinding format supported by your version.)
Workaround 3 — Escape then Enter:
If key remapping isn't an option, press Escape followed by Enter — this inserts a newline in the input without submitting. Works in all terminals without configuration.
Workaround 4 — Compose externally:
For multi-line prompts, type in your text editor and paste with Ctrl+V / Ctrl+Shift+V. The pasted text preserves newlines.

etirta · 3 months ago

@yurukusa MUCH appreciated for sharing Workaround 2 & 3.

Do you the Claude Code keybinding command to actually send to Claude? Because I want to use ENTER as newline and Ctrl+Enter to send to Claude. Thx.

EDIT:
Does it work for Claude CLI or the VS Code extension. I'm on Linux and use Claude CLI, and it doesn't honor the ~/.claude/keybindings.js settings at all.

YAMLcase · 3 months ago

God yes. This is worse than FPS games not having "invert y axis" option.

mjmikulski · 2 months ago

On Windows/WSL you can fix that with MS Power Toys -> keyboard manager -> shortcuts.

Remap

Ctrl+Enter -> Shift+Enter
Shift+Enter -> Ctrl+Enter

In the app column put WindowsTerminal. Otherwise, it will be system-wide.

cu · 2 months ago

The request in this issue is for:

Shift+Enter for newlines (matching standard conventions) Enter for submission

As far as I can tell, that is exactly how Claude Code works today.

What I want is actually the exact opposite. Everywhere else in the computing world, hitting Enter in a multi-line text field creates a newline. Having it submit the form (or in this case, the prompt) goes against literally decades of muscle memory.

I'm not sure how the "Enter to submit, Shift+Enter to newline" behavior got to be so prevalent. Slack, maybe? It's just entirely backwards.

Edit: I'm on a Mac currently but I use Linux too, so I'm not sure platform-specific workarounds are a good solution to this.

muammil · 2 months ago

Update: PyCharm now supports Shift+Enter natively, so the IDE inconsistency I mentioned earlier is resolved.

Claude Code has also added Option+Enter via /terminal-setup, which is a welcome step. However, the ideal solution would be a fully configurable newline shortcut — letting users set whatever works for them, whether that's Shift+Enter, Enter, Ctrl+Enter, or something else.