Codex CLI keyboard shortcuts
Codex CLI is OpenAI's coding agent for the terminal, and it can work while you keep typing. Its keys queue or interrupt messages during a task, edit your prompt, change reasoning effort and modes, and scroll the transcript and pickers.
Windows, macOS, Linux · 51 shortcutsSteering a running task
Submit, queue, interrupt, and reshape a running turn without leaving the composer.
| Action | Shortcuts |
|---|---|
| Submit the current draft | Windows / macOS / LinuxEnter |
| Queue the current draft while a task is running | Windows / macOS / LinuxTab |
| Interrupt the active turn | Windows / macOS / LinuxEsc |
| Edit the most recently queued messageShift+Left is also a built-in binding. Option may be reported for Alt on macOS. | Windows / macOS / LinuxAlt + Up |
| Switch between a side conversation and its parent | Windows / macOS / LinuxCtrl + / |
| Open the agent-session overview | Windows / macOS / LinuxAlt + A |
Session and display
Open Codex's overlays, copy responses, clear the UI, and switch the way terminal output is shown.
| Action | Shortcuts |
|---|---|
| Open the transcript overlay | Windows / macOS / LinuxCtrl + T |
| Open the external editor for the current draft | Windows / macOS / LinuxCtrl + G |
| Copy the last agent response as Markdown | Windows / macOS / LinuxCtrl + O |
| Clear the terminal UI | Windows / macOS / LinuxCtrl + L |
| Toggle raw scrollback mode | Windows / macOS / LinuxAlt + R |
| Toggle the composer shortcut overlayShift+? is included as a terminal compatibility binding. | Windows / macOS / Linux? |
| Exit CodexThe current keymap source does not assign a default app-exit key. Use /quit or the terminal's exit control. | Windows / macOS / LinuxNot documented |
Prompt editing
Move through the draft, search history, add a line break, and delete text with the built-in editor bindings.
| Action | Shortcuts |
|---|---|
| Insert a newline without submittingCtrl+M, Enter, Shift+Enter, and Alt+Enter are also built-in newline bindings. | Windows / macOS / LinuxCtrl + J |
| Move left one characterCtrl+B is also supported. | Windows / macOS / LinuxLeft |
| Move right one characterCtrl+F is also supported. | Windows / macOS / LinuxRight |
| Move up one visual lineCtrl+P is also supported. | Windows / macOS / LinuxUp |
| Move down one visual lineCtrl+N is also supported. | Windows / macOS / LinuxDown |
| Move to the beginning of the previous wordAlt+Left and Ctrl+Left are also built in. | Windows / macOS / LinuxAlt + B |
| Move to the end of the next wordAlt+Right and Ctrl+Right are also built in. | Windows / macOS / LinuxAlt + F |
| Move to the beginning of the lineCtrl+A is also supported. | Windows / macOS / LinuxHome |
| Move to the end of the lineCtrl+E is also supported. | Windows / macOS / LinuxEnd |
| Delete one character backwardShift+Backspace and Ctrl+H are also built in. | Windows / macOS / LinuxBackspace |
| Delete one character forwardShift+Delete and Ctrl+D are also built in. | Windows / macOS / LinuxDelete |
| Delete the previous wordAlt+Backspace and Ctrl+Shift+Backspace are also built in. | Windows / macOS / LinuxCtrl + W |
| Delete the next wordCtrl+Delete and Alt+D are also built in. | Windows / macOS / LinuxAlt + Delete |
| Delete from the cursor to the line start | Windows / macOS / LinuxCtrl + U |
| Delete from the cursor to the line end | Windows / macOS / LinuxCtrl + K |
| Paste the most recently deleted text | Windows / macOS / LinuxCtrl + Y |
| Open reverse history search | Windows / macOS / LinuxCtrl + R |
| Move to the next reverse-history match | Windows / macOS / LinuxCtrl + S |
| Open file and resource completion | Windows / macOS / Linux@ |
| Run a shell command | Windows / macOS / Linux! |
Reasoning and modes
Adjust reasoning effort or enter the optional Vim-style composer mode while a conversation remains open.
| Action | Shortcuts |
|---|---|
| Increase reasoning effortShift+Up is also a built-in binding. | Windows / macOS / LinuxAlt + . |
| Decrease reasoning effortShift+Down is also a built-in binding. | Windows / macOS / LinuxAlt + , |
| Toggle Vim mode for the composerNo built-in key is assigned in the current source. Configure tui.keymap.global.toggle_vim_mode if needed. | Windows / macOS / LinuxNot documented |
| Toggle Fast modeNo built-in key is assigned in the current source. Configure tui.keymap.global.toggle_fast_mode if needed. | Windows / macOS / LinuxNot documented |
Transcript and pickers
Navigate the transcript, shortcut help, list selectors, and agent or approval overlays with the shared TUI bindings.
| Action | Shortcuts |
|---|---|
| Scroll an overlay up one linek is also supported. | Windows / macOS / LinuxUp |
| Scroll an overlay down one linej is also supported. | Windows / macOS / LinuxDown |
| Scroll an overlay up one pageCtrl+B and Shift+Space are also supported. | Windows / macOS / LinuxPage Up |
| Scroll an overlay down one pageCtrl+F and Space are also supported. | Windows / macOS / LinuxPage Down |
| Scroll an overlay up half a page | Windows / macOS / LinuxCtrl + U |
| Scroll an overlay down half a page | Windows / macOS / LinuxCtrl + D |
| Jump to the top of an overlay | Windows / macOS / LinuxHome |
| Jump to the bottom of an overlay | Windows / macOS / LinuxEnd |
| Close an overlayCtrl+C also closes the pager. | Windows / macOS / Linuxq |
| Approve an approval request | Windows / macOS / Linuxy |
| Approve an action for the session | Windows / macOS / Linuxa |
| Approve an action for a command prefix | Windows / macOS / Linuxp |
| Deny an approval request | Windows / macOS / Linuxd |
| Cancel an approval dialogEsc and n decline or close the prompt according to its context. | Windows / macOS / Linuxc |
Source
official Codex CLI TUI keymap · Checked
Built-in TUI defaults from the official OpenAI Codex source checked August 26, 2026. Codex resolves context-specific bindings and lets users rebind supported actions through /keymap and tui.keymap in config.toml. Alt may be reported as Option on macOS terminals.