-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
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.):
ENTERinserts a newlineCtrl + Entersubmits content (or, alternatively,CMD + Enter)
The Codex TUI reverses this expectation:
ENTERsubmitsCtrl + Jinserts 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 + Jis 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 newlineCtrl + EnterorCMD + 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