Codex keyboard shortcuts depend on where you run it. In the CLI, Enter sends, Tab queues a message while Codex works, Esc interrupts, Esc twice edits your last message, Ctrl+R searches history and Ctrl+G opens your editor. The desktop app uses Cmd+K or Ctrl+K for its command menu, and the IDE extension binds new chat to Cmd+N or Ctrl+N.
The CLI keys below come from OpenAI's CLI command reference and the built-in source defaults in the open-source Codex repo at release rust-v0.164.0 (CLI 0.164.0), both checked on 26 October 2026. Keys can change between releases, so press ? in the CLI or open the app's shortcut list to confirm yours.
What are the essential Codex CLI shortcuts?
These are the keys you will use every day in the terminal UI (TUI):
| Key | What it does |
|---|---|
| Enter | Send the prompt |
| Enter while Codex is working | Add instructions to the current turn (steer) |
| Tab while Codex is working | Queue a prompt, slash command or shell command for the next turn |
| Esc | Interrupt the current turn |
| Esc, Esc (empty composer) | Edit your previous message and fork the chat from there |
| Ctrl+C | Interrupt a running task; close the session when idle (same as /exit) |
| Shift+Tab | Change mode, including toggling Plan mode |
? (empty composer) |
Show the shortcut overlay |
| Ctrl+L | Clear the terminal view but keep the chat |
A note on Ctrl+C: OpenAI's reference lists it as closing the session, while the TUI's own shortcut overlay labels it "Interrupt" while a task runs and "Quit" otherwise. Esc is the source default for the interrupt action in the 0.164.0 release either way.
Steering and queuing are worth learning first. OpenAI's prompting docs describe steer as the way to "change direction, add a missing detail, or share new information," and queue for "a follow-up that should wait until the current work finishes." Shift+Tab for Plan mode comes from OpenAI's best practices guide, which says to toggle it "with /plan or Shift+Tab." See the Codex best practices guide for when to plan.
Which CLI keys help you write prompts?
| Key | What it does |
|---|---|
@ |
Search for a file in the workspace and insert its path |
$ |
Mention a skill |
/ |
Open the slash command popup; Tab autocompletes |
! at the start of a line |
Run a local shell command under the current approval and sandbox settings |
| Ctrl+J | Insert a new line (Shift+Enter and Alt+Enter also work in terminals that report them) |
| Ctrl+G | Open the draft in the editor set by VISUAL, or EDITOR if VISUAL is unset |
| Ctrl+V | Paste an image (Ctrl+Alt+V inside WSL) |
| Up, Down | Restore earlier drafts |
| Ctrl+R | Search prompt history; Enter uses a match, Esc cancels |
| Ctrl+S | Move to the next history match |
Ctrl+J, Ctrl+V, Ctrl+S and $ are source defaults from the 0.164.0 release rather than entries on OpenAI's docs page, and so are these Emacs-style editing keys in the composer: Ctrl+A and Ctrl+E jump to the start and end of a line, Ctrl+U deletes to the start of the line, Ctrl+K deletes to the end, Ctrl+W deletes the previous word and Ctrl+Y pastes back the last deletion. If you prefer Vim, run /vim to toggle Vim mode, or set tui.vim_mode_default = true in config.toml.
For a longer prompt, Ctrl+G is the comfortable route: OpenAI's CLI customization page says to "Save and close the editor to return the text to the composer before sending it."
Which CLI keys control the session and transcript?
| Key | What it does |
|---|---|
| Alt+. or Shift+Up | Raise reasoning effort, for models that support it |
| Alt+, or Shift+Down | Lower reasoning effort |
| Shift+Left or Alt+Up | Edit the most recently queued message |
| Ctrl+O | Copy the latest completed Codex output (same as /copy) |
| Alt+R | Toggle raw scrollback for easier selection and copying (same as /raw) |
| Ctrl+T | Open the full transcript, and close it again |
| F3 | Find text in the transcript (/ also works inside the transcript view) |
| Ctrl+/ | Switch between a side chat and its parent |
| F8 | Start or stop voice, where voice is available |
Inside the transcript view, the pager uses the usual keys: Up, Down, j and k scroll, Space and Page Down page forward, Home and End jump to the top or bottom, and q closes it.
The reasoning, queued message, transcript, side chat and voice keys, and the pager keys, are source defaults from the rust-v0.164.0 release on GitHub rather than entries on the docs page. Run /keymap to see what your installed version uses.
How do you remap Codex CLI shortcuts?
Run /keymap, pick the context and action you want to change, then enter a new binding or remove the old one. OpenAI's reference says Codex "updates the active keymap and writes the custom binding to tui.keymap in config.toml."
You can also edit the file directly. This example comes from OpenAI's sample configuration:
[tui.keymap.global]
open_transcript = "ctrl-t"
[tui.keymap.composer]
submit = ["enter", "ctrl-m"]
[tui.keymap.chat]
interrupt_turn = "f12"
The rules are short:
- Write keys as names such as
ctrl-a,shift-enterandpage-down. - Give a list to bind several keys to one action.
- Use an empty list (
[]) to unbind an action. - Context-specific bindings override
tui.keymap.global. - Supported contexts, per OpenAI's configuration reference, include
global,chat,composer,editor,vim_normal,vim_operator,vim_text_object,pager,listandapproval.
The 0.164.0 source also accepts two-stroke chords separated by a space, such as ctrl-x ctrl-s. The Codex config guide explains where config.toml lives and how profiles layer on top of it.
What are the Codex IDE extension shortcuts?
The IDE extension adds only one default key binding. OpenAI's IDE commands page lists these commands:
| Command | Default key | What it does |
|---|---|---|
chatgpt.newChat |
Cmd+N (macOS), Ctrl+N (Windows, Linux) | Create a new chat |
chatgpt.addToThread |
None | Add the selected lines as context |
chatgpt.addFileToThread |
None | Add the whole file as context |
chatgpt.newCodexPanel |
None | Create a new Codex panel |
chatgpt.openCommandMenu |
None | Open the Codex command menu |
chatgpt.openSidebar |
None | Open the Codex sidebar |
To bind any of them, open the Command Palette (Cmd+Shift+P or Ctrl+Shift+P), run Preferences: Open Keyboard Shortcuts, search for Codex or the command ID, select the pencil icon and press your key.
Two extension settings change how keys behave in the composer:
chatgpt.composerEnterBehaviordecides whether Enter always sends (enter), Cmd or Ctrl+Enter sends multiline prompts (cmdIfMultiline), or the modifier is always required (cmdAlways).chatgpt.followUpQueueModedecides whether messages sent during a run queue or steer. Press Cmd or Ctrl+Shift+Enter to do the opposite for one message.
To attach an image, hold Shift while you drag it into the composer, so the extension accepts the drop instead of passing it to the editor (image inputs docs). More on the extension is in the Codex IDE extension guide.
What are the Codex desktop app shortcuts?
Codex now runs inside the ChatGPT desktop app, and OpenAI's desktop app commands page lists its default keys. These are the ones that matter most for coding work:
| Action | macOS | Windows and Linux |
|---|---|---|
| Open command menu | Cmd+K or Cmd+Shift+P | Ctrl+K or Ctrl+Shift+P |
| Show keyboard shortcuts | Cmd+/ | Ctrl+/ |
| Open folder | Cmd+O | Ctrl+O |
| New chat | Cmd+N | Ctrl+N |
| Open side chat | Cmd+Option+S | Ctrl+Alt+S |
| Switch to Chat, Work or Codex | Ctrl+1, 2 or 3 | Alt+1, 2 or 3 |
| Toggle sidebar | Cmd+B | Ctrl+B |
| Toggle terminal | Ctrl+` | Ctrl+` |
| Toggle bottom panel | Cmd+J | Ctrl+J |
| Search files | Cmd+P | Ctrl+P |
| Toggle file tree | Cmd+Shift+E | Ctrl+Shift+E |
| Open review tab | Ctrl+Shift+G | Ctrl+Shift+G |
| Open model picker | Ctrl+Shift+M | Ctrl+Shift+M |
| Next chat needing attention | Cmd+Option+A | Ctrl+Alt+A |
| Go to chat 1 to 9 | Cmd+1 to 9 | Ctrl+1 to 9 |
| Approve or decline a request | Enter or Esc | Enter or Esc |
| Find in chat | Cmd+F | Ctrl+F |
Search chats has no default key; assign one under Settings > Keyboard Shortcuts, where you can also customize or reset any shortcut. The search box there can switch to keystroke mode, so you can press a key combination to find out what it does. More on the app itself is in the Codex app guide.
Where do slash commands fit in?
Many actions have both a key and a slash command: Ctrl+O and /copy, Alt+R and /raw, Shift+Tab and /plan, Ctrl+C and /exit. Others, such as /review, /model, /status and /compact, have no default key at all. The Codex slash commands guide lists them by surface, and the Codex cheat sheet puts keys, commands and flags on one page.
If you switch between tools, the Claude Code keyboard shortcuts guide covers the same ground for Claude Code. Shortcuts make prompting faster, but the prompts themselves are worth keeping: Kipt saves your prompts and skills as Markdown in a private GitHub repo you own, with fill-in blanks you complete each time you reuse one.