Kipt

Your prompts and skills, one keystroke away.

Explore

Codex keyboard shortcuts: the CLI, IDE extension and desktop app

Every documented Codex keyboard shortcut: CLI keys like Tab to queue and Esc Esc to fork, remapping with /keymap, IDE extension bindings and desktop app keys.

By the Kipt team · Updated 26 October 2026

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-enter and page-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, list and approval.

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.composerEnterBehavior decides whether Enter always sends (enter), Cmd or Ctrl+Enter sends multiline prompts (cmdIfMultiline), or the modifier is always required (cmdAlways).
  • chatgpt.followUpQueueMode decides 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.

Questions

How do I stop Codex while it is working in the terminal?

Press Esc. In the open-source Codex TUI (release 0.164.0), Esc is the source default for the interrupt action, and you can remap it with /keymap. Ctrl+C is described two ways: OpenAI's CLI reference says it closes the session, while the TUI's shortcut overlay labels it Interrupt while a task runs and Quit otherwise.

How do I add a new line in the Codex CLI without sending?

Press Ctrl+J. The TUI's default newline bindings also include Shift+Enter and Alt+Enter, which work in terminals that pass those keys through. For long prompts, press Ctrl+G to write in your external editor instead.

What is the difference between Enter and Tab while Codex is working?

Enter steers: it adds your message to the current turn. Tab queues: it holds the message, slash command or shell command until the next turn starts.

Can I change Codex keyboard shortcuts?

Yes. In the CLI, run /keymap to inspect and change bindings, which are saved under tui.keymap in config.toml. In the IDE extension, use VS Code's Keyboard Shortcuts editor. In the desktop app, open Settings > Keyboard Shortcuts.

How do I see all shortcuts inside Codex?

In the CLI, press ? while the composer is empty to open the shortcut overlay. In the desktop app, press Cmd+/ on macOS or Ctrl+/ on Windows and Linux.

How do I paste an image into the Codex CLI?

Press Ctrl+V to paste an image from the clipboard into the composer. The TUI's shortcut overlay shows Ctrl+Alt+V instead when Codex runs inside WSL. You can also pass files at launch with codex --image.

More in Codex

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.