[FEATURE] Ctrl+Enter for newlines conflicts with standard app conventions - request customizable shortcuts
## 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
- Open Claude Code in interactive mode
- Type a message
- Press
Ctrl+Enterto add a newline - Press
Enterto submit the message
## Requested Behavior
Allow users to configure alternative keyboard shortcuts for newline insertion, such as:
Shift+Enterfor newlines (matching standard conventions)Enterfor submission- Or allow users to swap the current
Enter/Ctrl+Enterbehavior
## 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:
- 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
- Workflow disruption: Constant mental context switching between Claude Code's unique shortcuts and standard application behavior
- User safety issues: Mis-sent emails and incomplete form submissions can have professional consequences
## Additional Context
- The
\+Enterworkaround exists but is non-standard and unintuitive /terminal-setuponly 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
29 Comments
i agree this is very native for common users to have Shift+Enter hotkey for newlines
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".
Strongly agree,
shift+enteris 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!!Seriously. My number one pain point using Claude Code is this.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I prevented auto-close because the 1. and 2. are about the behavior of
Enter. 3. seems to be about supportingShift+Enterin 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 asEnteralready 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
ESCwill wipe out everything I typed.Happy for this issue to be closed if that's already happening.
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
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" />
We need the Enter key configuration feature, like Slack has.
https://slack.com/help/articles/115005523006-Set-your-Enter-key-preference
I'd also benefit from configurable keybindings, though with a different preference. Coming from web-based chat apps (Slack, Discord, ChatGPT), I'd like:
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:
+1 for making this configurable rather than changing the defaults!
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.
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.
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 is still very much a problem and occurring.
This drives me crazy and means constantly truncated prompts mis-sent in Claude Code, hampering usability.
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.
Maybe maybe? https://github.com/anthropics/claude-code/commit/870624fc1581a70590e382f263e2972b3f1e56f5#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR9
@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).
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.
+1(Keep this post active)
For Windows terminal:
Doesn't work.
Works fine in the desktop app with Claude Chat, but Claude Code doesn't.
I have the same problem on MacOS. I have so much resistance towards using Claude CLI because of this issue.
Shift+Enter -> Newlineis industry standard everywhere. Please fix this 🙏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:
\nkitty.conf):``
``map ctrl+enter send_text all \r
wezterm.lua):``
lua
``config.keys = {
{ key = 'Enter', mods = 'CTRL', action = act.SendString '\n' },
}
Workaround 2 — Use keybindings.json:
Claude Code supports custom keybindings:
(Check
/helpfor the exact keybinding format supported by your version.)Workaround 3 — Escape then Enter:
If key remapping isn't an option, press
Escapefollowed byEnter— 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.
@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
ENTERas 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.
God yes. This is worse than FPS games not having "invert y axis" option.
On Windows/WSL you can fix that with MS Power Toys -> keyboard manager -> shortcuts.
Remap
In the app column put
WindowsTerminal. Otherwise, it will be system-wide.The request in this issue is for:
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.
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.