OpenCode keyboard shortcuts
OpenCode's terminal interface puts most of its commands behind a leader key, Ctrl+X by default: press it, let go, then press the letter. The leader, the two-second wait for the next key and the other keybinds can all be changed in tui.json, and every row below is the default OpenCode documents.
Checked against OpenCode documentation — Keybinds, OpenCode documentation — TUI, OpenCode documentation — Agents and OpenCode repository — default keybind definitions, v1.18.32. Version: OpenCode 1.18.32, terminal interface, default keybinds.
Showing the Windows keyboard. Showing the Mac keyboard.
The top 20 are the OpenCode shortcuts this page marks as the ones to learn first, in the order they appear here. The drill asks the marked ones first too, shuffled. Or tick your own and print those.
The 20 to learn first: the shortcuts the OpenCode page marks as the ones to learn first, in the order they appear on it.
Your own sheet: the OpenCode shortcuts you ticked.
Start here
Ctrl+X is the leader. Press it, let go, then press the key after it: Ctrl+X then N starts a new session.
Practise theseManaging the session
Models and agents
Practise theseWriting the prompt
Practise theseEditing the prompt
Readline-style keys, as in most shells. Several have a second or third binding, all listed.
Practise theseReading the conversation
Practise theseSubagent sessions
Work handed to a subagent runs in a child session. Only the first of these keys uses the leader; the other three are single keys by design.
Practise theseLayout, themes and the terminal
Practise theseLists and dialogs
The keys for moving through a dialog's list, such as the model dialog.
Practise theseNext
Codex CLI
Codex CLI is OpenAI's coding agent for the terminal, and OpenAI documents only a short list of its keys.
Claude Code
This covers Claude Code, the terminal tool, which is where the shortcuts are.
Gemini CLI
Gemini CLI is Google's coding agent for the terminal, and Google publishes a full table of its default keys, many with two or three alternatives.
Terminal
Almost everything here comes from readline, the line editor that bash and zsh both use.
OpenCode keyboard shortcuts — comboshelf.com. Checked 27 September 2026 against OpenCode documentation — Keybinds.