Skip to main content

Keyboard Shortcuts

Primary Keybindings

ShortcutAction
TabSwitch between primary agents (Build / Plan)
ctrl+pOpen command palette
ctrl+tCycle through model variants
ctrl+cCancel current generation

File and Navigation

ShortcutAction
@File reference fuzzy search
/Slash commands
!Bash command prefix (start message line with !)
Up / DownNavigate message history when input is empty

Session Tree Navigation

ShortcutAction
Leader+DownEnter first child session
Up (at parent session prompt)Return to parent session
RightSwitch to next child session
Down (at last child prompt)Enter new child session
LeftSwitch to previous child session

The default leader key is ctrl+x.

Session Management (ctrl+x prefix)

ShortcutAction
ctrl+x cCompact / summarize session
ctrl+x eOpen external editor
ctrl+x qExit OpenCode
ctrl+x xExport conversation to Markdown
ctrl+x mList and switch models
ctrl+x nStart new session
ctrl+x rRedo last undone change
ctrl+x lList all sessions
ctrl+x tList available themes
ctrl+x uUndo last change

Selection and Copy

ShortcutAction
ctrl+aSelect all (in input area)
ctrl+shift+cCopy selected text
ctrl+shift+vPaste
ctrl+left / ctrl+rightJump word by word in input
ctrl+uClear input line
ctrl+wDelete word before cursor
alt+backspaceDelete word before cursor
ctrl+backspaceDelete word before cursor

Scrolling

ShortcutAction
ctrl+upScroll output up
ctrl+downScroll output down
pgupScroll output page up
pgdnScroll output page down
homeScroll to beginning of output
endScroll to end of output

Customizing Keybinds

Keybindings can be customized in tui.json under the keybinds section:

{
"keybinds": [
{
"keys": ["ctrl+p"],
"action": "command_palette"
},
{
"keys": ["ctrl+x", "c"],
"action": "compact"
},
{
"keys": ["alt+t"],
"action": "cycle_models"
}
]
}

Custom Action Examples

{
"keybinds": [
{
"keys": ["f1"],
"action": "help"
},
{
"keys": ["ctrl+shift+e"],
"action": "export"
},
{
"keys": ["alt+1"],
"action": "agent_switch",
"args": { "agent": "build" }
},
{
"keys": ["alt+2"],
"action": "agent_switch",
"args": { "agent": "plan" }
},
{
"keys": ["ctrl+o"],
"action": "external_editor"
},
{
"keys": ["ctrl+s"],
"action": "compact"
},
{
"keys": ["alt+down"],
"action": "scroll_down"
},
{
"keys": ["alt+up"],
"action": "scroll_up"
}
]
}

Available Actions

ActionDescription
command_paletteOpen command palette
compactCompact/summarize session
external_editorOpen external editor
exitExit OpenCode
exportExport to Markdown
list_modelsList and switch models
new_sessionStart new session
redoRedo last change
list_sessionsList sessions
list_themesList themes
undoUndo last change
cycle_modelsCycle model variants
agent_switchSwitch to specific agent (requires args.agent)
helpOpen help
scroll_upScroll output up
scroll_downScroll output down
select_allSelect all input text

Theme Support for Dimmed/Disabled Shortcuts

Some keybindings display dimmed or disabled when the associated feature is unavailable. This visual feedback is theme-dependent and controlled by the theme's disabled style in tui.json.