Codex CLI keyboard shortcuts
Codex CLI gives you a terminal UI around a running coding task. The current keymap covers steering, prompt editing, transcript navigation, reasoning effort, approvals, and the list pickers that appear around a session.
Windows, macOS, Linux · 51 shortcutsSteering a running task
Submit, queue, interrupt, and reshape a running turn without leaving the composer.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Submit the current draft | Enter | Enter | Enter |
| Queue the current draft while a task is running | Tab | Tab | Tab |
| Interrupt the active turn | Esc | Esc | Esc |
| Edit the most recently queued messageShift+Left is also a built-in binding. Option may be reported for Alt on macOS. | AltUp | AltUp | AltUp |
| Switch between a side conversation and its parent | Ctrl/ | Ctrl/ | Ctrl/ |
| Open the agent-session overview | AltA | AltA | AltA |
Session and display
Open Codex's overlays, copy responses, clear the UI, and switch the way terminal output is shown.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Open the transcript overlay | CtrlT | CtrlT | CtrlT |
| Open the external editor for the current draft | CtrlG | CtrlG | CtrlG |
| Copy the last agent response as Markdown | CtrlO | CtrlO | CtrlO |
| Clear the terminal UI | CtrlL | CtrlL | CtrlL |
| Toggle raw scrollback mode | AltR | AltR | AltR |
| Toggle the composer shortcut overlayShift+? is included as a terminal compatibility binding. | ? | ? | ? |
| Exit CodexThe current keymap source does not assign a default app-exit key. Use /quit or the terminal's exit control. | Not documented | Not documented | Not documented |
Prompt editing
Move through the draft, search history, add a line break, and delete text with the built-in editor bindings.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Insert a newline without submittingCtrl+M, Enter, Shift+Enter, and Alt+Enter are also built-in newline bindings. | CtrlJ | CtrlJ | CtrlJ |
| Move left one characterCtrl+B is also supported. | Left | Left | Left |
| Move right one characterCtrl+F is also supported. | Right | Right | Right |
| Move up one visual lineCtrl+P is also supported. | Up | Up | Up |
| Move down one visual lineCtrl+N is also supported. | Down | Down | Down |
| Move to the beginning of the previous wordAlt+Left and Ctrl+Left are also built in. | AltB | AltB | AltB |
| Move to the end of the next wordAlt+Right and Ctrl+Right are also built in. | AltF | AltF | AltF |
| Move to the beginning of the lineCtrl+A is also supported. | Home | Home | Home |
| Move to the end of the lineCtrl+E is also supported. | End | End | End |
| Delete one character backwardShift+Backspace and Ctrl+H are also built in. | Backspace | Backspace | Backspace |
| Delete one character forwardShift+Delete and Ctrl+D are also built in. | Delete | Delete | Delete |
| Delete the previous wordAlt+Backspace and Ctrl+Shift+Backspace are also built in. | CtrlW | CtrlW | CtrlW |
| Delete the next wordCtrl+Delete and Alt+D are also built in. | AltDelete | AltDelete | AltDelete |
| Delete from the cursor to the line start | CtrlU | CtrlU | CtrlU |
| Delete from the cursor to the line end | CtrlK | CtrlK | CtrlK |
| Paste the most recently deleted text | CtrlY | CtrlY | CtrlY |
| Open reverse history search | CtrlR | CtrlR | CtrlR |
| Move to the next reverse-history match | CtrlS | CtrlS | CtrlS |
| Open file and resource completion | @ | @ | @ |
| Run a shell command | ! | ! | ! |
Reasoning and modes
Adjust reasoning effort or enter the optional Vim-style composer mode while a conversation remains open.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Increase reasoning effortShift+Up is also a built-in binding. | Alt. | Alt. | Alt. |
| Decrease reasoning effortShift+Down is also a built-in binding. | Alt, | Alt, | Alt, |
| Toggle Vim mode for the composerNo built-in key is assigned in the current source. Configure tui.keymap.global.toggle_vim_mode if needed. | Not documented | Not documented | Not documented |
| Toggle Fast modeNo built-in key is assigned in the current source. Configure tui.keymap.global.toggle_fast_mode if needed. | Not documented | Not documented | Not documented |
Transcript and pickers
Navigate the transcript, shortcut help, list selectors, and agent or approval overlays with the shared TUI bindings.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Scroll an overlay up one linek is also supported. | Up | Up | Up |
| Scroll an overlay down one linej is also supported. | Down | Down | Down |
| Scroll an overlay up one pageCtrl+B and Shift+Space are also supported. | Page Up | Page Up | Page Up |
| Scroll an overlay down one pageCtrl+F and Space are also supported. | Page Down | Page Down | Page Down |
| Scroll an overlay up half a page | CtrlU | CtrlU | CtrlU |
| Scroll an overlay down half a page | CtrlD | CtrlD | CtrlD |
| Jump to the top of an overlay | Home | Home | Home |
| Jump to the bottom of an overlay | End | End | End |
| Close an overlayCtrl+C also closes the pager. | q | q | q |
| Approve an approval request | y | y | y |
| Approve an action for the session | a | a | a |
| Approve an action for a command prefix | p | p | p |
| Deny an approval request | d | d | d |
| Cancel an approval dialogEsc and n decline or close the prompt according to its context. | c | c | c |