You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Config option that swaps the default Enter key behavior: Enter inserts newline, Ctrl+Enter submits input #5716
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
Reacted by techjoec, Adrien KERFOURN, mafiozydev, Akimasa Watanuki, Hugo Fichter, Shaf M., Sinisa Mikasinovic, jEzEk, JimDanner, miura-htec and 12 more
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
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 Enter or Ctrl+Enter for 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.
+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.
Reacted by JimDanner, Sinisa Mikasinovic, roshal, Javier Maestro and Aleksey Khokhrin
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:
Shortcut keys should behave consistently in all situations to reduce the cognitive load on users.
Regardless of how users configure shortcut keys, the system should support both submitting and inserting a new line.
@etraut-openai, thanks that's a significant improvement. i can now bind enter to new line (need to unlearn pressing CTRL all the time)!
A small thing: i can't bind ctrl-enter to submit. That's fine, i've bound it to ctrl-j which is mechanically equivalent. Maybe this is a WSL2 windows terminal thing.
Activity
github-actions commentedon Oct 26, 2025
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
mafiozydev commentedon Nov 2, 2025
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
PaulRudin commentedon Dec 6, 2025
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.
PowerSix commentedon Jan 29, 2026
gpeal commentedon Jan 30, 2026
PowerSix commentedon Feb 1, 2026
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).
etraut-openai commentedon Feb 1, 2026
@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.
fatih commentedon Feb 5, 2026
miura-htec commentedon Feb 13, 2026
+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.
libook commentedon May 15, 2026
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:
etraut-openai commentedon May 15, 2026
We recently added the
/keymapcommand. It allows you to configure key bindings for all key shortcuts in the TUI.hackf5 commentedon May 15, 2026
@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.fix(tui): bind Ctrl+Enter to insert_newline so Shift+Enter works on W…