What variant of Codex are you using?
CLI
What feature would you like to see?
Summary
Currently, the Codex CLI/TUI sends the prompt on ENTER and inserts a newline on Ctrl + J. While this matches traditional terminal behavior, the Codex TUI functions primarily as a multiline prompt editor rather than a classic shell.
This keybinding choice conflicts with modern text-editing conventions and frequently leads to accidental submission of incomplete prompts.
Problem
In most contemporary tools (IDEs, chat interfaces, documentation tools, browsers, etc.):
ENTER inserts a newline
Ctrl + Enter submits content (or, alternatively, CMD + Enter)
The Codex TUI reverses this expectation:
ENTER submits
Ctrl + J inserts newline
This creates several usability issues:
- Strong mismatch with established typing muscle memory
- Frequent accidental submission of unfinished prompts
- Cognitive friction when switching between Codex and other tools
Ctrl + J is non-standard and unintuitive for multiline entry
In practice, this results in a high rate of unintended prompt submission.
Proposed Change
Adopt a text-editor-oriented interaction model:
ENTER → Insert newline
Ctrl + Enter or CMD + Enter → Submit prompt
Alternatively, and MUCH BETTER - make this configurable:
- Terminal-style mode (current behavior)
- Editor-style mode (proposed behavior)
- Define custom bindings (let user choose their combinations)
Rationale
The Codex TUI operates more like a structured prompt composition interface than a traditional command shell. Aligning keybindings with modern editor conventions would:
- Reduce accidental submissions
- Improve workflow consistency
- Lower cognitive load
- Better match user expectations in AI prompt composition contexts
This change would improve usability without affecting core functionality.
Additional information
No response
What variant of Codex are you using?
CLI
What feature would you like to see?
Summary
Currently, the Codex CLI/TUI sends the prompt on
ENTERand inserts a newline onCtrl + J. While this matches traditional terminal behavior, the Codex TUI functions primarily as a multiline prompt editor rather than a classic shell.This keybinding choice conflicts with modern text-editing conventions and frequently leads to accidental submission of incomplete prompts.
Problem
In most contemporary tools (IDEs, chat interfaces, documentation tools, browsers, etc.):
ENTERinserts a newlineCtrl + Entersubmits content (or, alternatively,CMD + Enter)The Codex TUI reverses this expectation:
ENTERsubmitsCtrl + Jinserts newlineThis creates several usability issues:
Ctrl + Jis non-standard and unintuitive for multiline entryIn practice, this results in a high rate of unintended prompt submission.
Proposed Change
Adopt a text-editor-oriented interaction model:
ENTER→ Insert newlineCtrl + EnterorCMD + Enter→ Submit promptAlternatively, and MUCH BETTER - make this configurable:
Rationale
The Codex TUI operates more like a structured prompt composition interface than a traditional command shell. Aligning keybindings with modern editor conventions would:
This change would improve usability without affecting core functionality.
Additional information
No response