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 shortcuts

Steering a running task

Submit, queue, interrupt, and reshape a running turn without leaving the composer.

ActionWindowsmacOSLinux
Submit the current draftEnterEnterEnter
Queue the current draft while a task is runningTabTabTab
Interrupt the active turnEscEscEsc
Edit the most recently queued messageShift+Left is also a built-in binding. Option may be reported for Alt on macOS.AltUpAltUpAltUp
Switch between a side conversation and its parentCtrl/Ctrl/Ctrl/
Open the agent-session overviewAltAAltAAltA

Session and display

Open Codex's overlays, copy responses, clear the UI, and switch the way terminal output is shown.

ActionWindowsmacOSLinux
Open the transcript overlayCtrlTCtrlTCtrlT
Open the external editor for the current draftCtrlGCtrlGCtrlG
Copy the last agent response as MarkdownCtrlOCtrlOCtrlO
Clear the terminal UICtrlLCtrlLCtrlL
Toggle raw scrollback modeAltRAltRAltR
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 documentedNot documentedNot documented

Prompt editing

Move through the draft, search history, add a line break, and delete text with the built-in editor bindings.

ActionWindowsmacOSLinux
Insert a newline without submittingCtrl+M, Enter, Shift+Enter, and Alt+Enter are also built-in newline bindings.CtrlJCtrlJCtrlJ
Move left one characterCtrl+B is also supported.LeftLeftLeft
Move right one characterCtrl+F is also supported.RightRightRight
Move up one visual lineCtrl+P is also supported.UpUpUp
Move down one visual lineCtrl+N is also supported.DownDownDown
Move to the beginning of the previous wordAlt+Left and Ctrl+Left are also built in.AltBAltBAltB
Move to the end of the next wordAlt+Right and Ctrl+Right are also built in.AltFAltFAltF
Move to the beginning of the lineCtrl+A is also supported.HomeHomeHome
Move to the end of the lineCtrl+E is also supported.EndEndEnd
Delete one character backwardShift+Backspace and Ctrl+H are also built in.BackspaceBackspaceBackspace
Delete one character forwardShift+Delete and Ctrl+D are also built in.DeleteDeleteDelete
Delete the previous wordAlt+Backspace and Ctrl+Shift+Backspace are also built in.CtrlWCtrlWCtrlW
Delete the next wordCtrl+Delete and Alt+D are also built in.AltDeleteAltDeleteAltDelete
Delete from the cursor to the line startCtrlUCtrlUCtrlU
Delete from the cursor to the line endCtrlKCtrlKCtrlK
Paste the most recently deleted textCtrlYCtrlYCtrlY
Open reverse history searchCtrlRCtrlRCtrlR
Move to the next reverse-history matchCtrlSCtrlSCtrlS
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.

ActionWindowsmacOSLinux
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 documentedNot documentedNot documented
Toggle Fast modeNo built-in key is assigned in the current source. Configure tui.keymap.global.toggle_fast_mode if needed.Not documentedNot documentedNot documented

Transcript and pickers

Navigate the transcript, shortcut help, list selectors, and agent or approval overlays with the shared TUI bindings.

ActionWindowsmacOSLinux
Scroll an overlay up one linek is also supported.UpUpUp
Scroll an overlay down one linej is also supported.DownDownDown
Scroll an overlay up one pageCtrl+B and Shift+Space are also supported.Page UpPage UpPage Up
Scroll an overlay down one pageCtrl+F and Space are also supported.Page DownPage DownPage Down
Scroll an overlay up half a pageCtrlUCtrlUCtrlU
Scroll an overlay down half a pageCtrlDCtrlDCtrlD
Jump to the top of an overlayHomeHomeHome
Jump to the bottom of an overlayEndEndEnd
Close an overlayCtrl+C also closes the pager.qqq
Approve an approval requestyyy
Approve an action for the sessionaaa
Approve an action for a command prefixppp
Deny an approval requestddd
Cancel an approval dialogEsc and n decline or close the prompt according to its context.ccc

Make a printable Codex CLI sheet