What version of Codex CLI is running?
codex-cli 0.128.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.5
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
Zed integrated terminal, Zed 1.0.0, PowerShell 5.1
What issue are you seeing?
After upgrading to Codex CLI 0.128.0, pressing Shift+Enter no longer inserts a newline in the Codex TUI when running inside the Zed integrated terminal. Instead, pressing Shift+Enter does nothing at all.
Pressing Shift+Enter properly inserted newlines in 0.125.0. Downgrading to 0.125.0 restores the expected behavior.
What steps can reproduce the bug?
- On Windows, open Zed editor.
- Open the Zed integrated terminal.
- Run
codex.
- Type some text.
- Press
Shift+Enter.
What is the expected behavior?
Shift+Enter should insert a newline.
Additional information
In the Zed integrated terminal, Shift+Enter is reported as LF / U+000A, which corresponds to Ctrl+J in C0 control-code terms:
PowerShell `[Console]::ReadKey($true)` output:
Shift+Enter:
KeyCharCode : U+000A / decimal 10
Key : Enter
Modifiers : Control
In previous version 0.125.0, this was directly handled in textarea.rs here:
KeyEvent {
code: KeyCode::Char('j' | 'm'),
modifiers: KeyModifiers::CONTROL,
..
}
| KeyEvent {
code: KeyCode::Enter,
..
} => self.insert_str("\n"),
But now newline handling goes through this keymap path in 0.128.0:
if keymap.insert_newline.is_pressed(event) {
self.insert_str("\n");
return;
}
Ctrl+J is bound to insert_newline:
editor: EditorKeymap {
insert_newline: default_bindings![
ctrl(KeyCode::Char('j')),
ctrl(KeyCode::Char('m')),
plain(KeyCode::Enter),
shift(KeyCode::Enter)
],
But U+000A is not normalized to Ctrl+J in key_hint.rs:
fn c0_control_char_to_ctrl_char(ch: char) -> Option<char> {
match ch {
'\u{0002}' => Some('b'),
'\u{0006}' => Some('f'),
'\u{000e}' => Some('n'),
'\u{0010}' => Some('p'),
'\u{0012}' => Some('r'),
'\u{0013}' => Some('s'),
_ => None,
}
}
Suggested Fix:
fn c0_control_char_to_ctrl_char(ch: char) -> Option<char> {
match ch {
'\u{0002}' => Some('b'),
'\u{0006}' => Some('f'),
'\u{000a}' => Some('j'),
'\u{000e}' => Some('n'),
'\u{0010}' => Some('p'),
'\u{0012}' => Some('r'),
'\u{0013}' => Some('s'),
_ => None,
}
}
This new match arm should normalize U+000A to logical Ctrl+J, which should then match the existing insert_newline binding in EditorKeymap in keymap.rs.
What version of Codex CLI is running?
codex-cli 0.128.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.5
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
Zed integrated terminal, Zed 1.0.0, PowerShell 5.1
What issue are you seeing?
After upgrading to Codex CLI
0.128.0, pressingShift+Enterno longer inserts a newline in the Codex TUI when running inside the Zed integrated terminal. Instead, pressingShift+Enterdoes nothing at all.Pressing
Shift+Enterproperly inserted newlines in0.125.0. Downgrading to0.125.0restores the expected behavior.What steps can reproduce the bug?
codex.Shift+Enter.What is the expected behavior?
Shift+Entershould insert a newline.Additional information
In the Zed integrated terminal,
Shift+Enteris reported as LF /U+000A, which corresponds toCtrl+Jin C0 control-code terms:In previous version
0.125.0, this was directly handled intextarea.rshere:But now newline handling goes through this keymap path in
0.128.0:Ctrl+Jis bound toinsert_newline:But
U+000Ais not normalized toCtrl+Jinkey_hint.rs:Suggested Fix:
This new match arm should normalize
U+000Ato logicalCtrl+J, which should then match the existinginsert_newlinebinding inEditorKeymapinkeymap.rs.