Config option that swaps the default Enter key behavior: Enter inserts newline, Ctrl+Enter submits input
Resolved 💬 12 comments Opened Oct 26, 2025 by hackf5 Closed May 15, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What feature would you like to see?
Currently, pressing Enter submits the input, while Ctrl+Enter inserts a newline.
This setup optimises for single-line use, but many workflows involve multi-line input by default. Accidental early submissions are frequent and frustrating.
Proposed Enhancement
Add a new config option that swaps the default behavior:
- Enter → insert newline
- Ctrl+Enter → submit input
Additional information
_No response_
12 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
same. Using codex for one week. And i was speechless when discovered after last update that there is no more inserting trough enter and you cannot return it back. So, now i have ctrl+enter and enter that are sending messages :)))))) and you cannot reset it somewhere. just... i dont know.. wanna break my keyboard
The keybinds for this kind of thing just need to be configurable - some fix set of presets is always going to be inconvenient for some users.
We're slowly regressing. Now "Enter to send" is being forced on everyone since 0.4.67 -> https://github.com/openai/codex/issues/5687
0.4.66 is the latest non-frustrating version.
There is a setting (which, admittedly, didn't work in the latest release) but will be fully working in the next one.
<img width="518" height="550" alt="Image" src="https://github.com/user-attachments/assets/37c356be-6a43-4145-a25f-7043908ea2dc" />
This setting is just a cheap way to restore the functionality that used to be a previous default. And, as you noted, it doesn't even work.
I reported it here (#5687) but it just got ignored, like most of discussions about Codex hotkeys.
Even this conversation we're having right here is being marked as off-topic. Devs would rather stifle this entire hotkey conversation than have people choose whether to use
EnterorCtrl+Enterfor a new line.If they actually cared, we wouldn't have 4-month long, highly upvoted issues like this one (#3049).
@PowerSix, this issue is specifically about the Codex CLI (TUI). If I understand correctly, you are using the Codex IDE Extension, so this issue does not apply. That's why I hid these remarks as "off topic" to avoid confusion.
I have a problem with this as well. I think Codex's current setting is suboptimal, and isn't a standard at all. Here is what Codex provides us:
<img width="1786" height="500" alt="Image" src="https://github.com/user-attachments/assets/5b777a94-7f49-419f-8e0d-5dc7d3d1ca68" />
The problem is that, I want it to be predictable, meaning:
enter: creates a newline, alwayscmd+enter: submits my promptsHowever with this settings, if enabled, if I write a line, and hit enter, it submits my prompt immediately. I have to first do a
shift+enter, and then eachenterbecomes a newline. Not only is it pretty uncommon, it also messes up with our mental model.The industry wide standard is obvious. If you provide this, make sure Enter always creates a newline, and
cmd+enterorctrl+entersubmits it. Here are some example from other app or websites.Slack macOS App:
<img width="948" height="482" alt="Image" src="https://github.com/user-attachments/assets/330af728-30b8-4726-961a-4ab3048c0479" />
LinkedIn:
<img width="588" height="164" alt="Image" src="https://github.com/user-attachments/assets/6cdcdd84-5e8f-4745-89d8-05e7607c0c2b" />
Cursor:
<img width="1434" height="234" alt="Image" src="https://github.com/user-attachments/assets/a518ac94-0953-409f-9674-a4d49fa6e779" />
Can we please fix the setting and makes sure it doesn't introduce a new behaviour. Let's make sure it's following certain standards, and it's predictable and doesn't require us to think about when a
enterproduces a newline.+1 for this request. On macOS, I want Enter to insert a newline and Cmd+Enter to send (Ctrl+Enter on Windows/Linux). This would prevent accidental sends when writing multi-line prompts.
The current design seems to prevent me from manually inserting a new line; instead, I have to copy a multi-line text block from elsewhere just to use the Enter key to create a new line. A better design would be:
We recently added the
/keymapcommand. It allows you to configure key bindings for all key shortcuts in the TUI.@etraut-openai, thanks that's a significant improvement. i can now bind
enterto new line (need to unlearn pressing CTRL all the time)!A small thing: i can't bind
ctrl-enterto submit. That's fine, i've bound it toctrl-jwhich is mechanically equivalent. Maybe this is a WSL2 windows terminal thing.