Keybindings

August 11, 2026 ยท View on GitHub

All keyboard shortcuts can be customized via ~/.prime/agent/keybindings.json. Each action can be bound to one or more keys.

The config file uses the same namespaced keybinding ids that Prime Agent uses internally and that extension authors use in keyHint() and injected keybindings managers.

Older configs using pre-namespaced ids such as cursorUp or expandTools are migrated automatically to the namespaced ids on startup.

After editing keybindings.json, run /reload in Prime Agent to apply the changes without restarting the session.

Key Format

modifier+key where modifiers are ctrl, shift, alt (combinable) and keys are:

  • Letters: a-z
  • Digits: 0-9
  • Special: escape, esc, enter, return, tab, space, backspace, delete, insert, clear, home, end, pageUp, pageDown, up, down, left, right
  • Function: f1-f12
  • Symbols: `, -, =, [, ], \, ;, ', ,, ., /, !, @, #, $, %, ^, &, *, (, ), _, +, |, ~, {, }, :, <, >, ?

Modifier combinations: ctrl+shift+x, alt+ctrl+x, ctrl+shift+alt+x, ctrl+1, etc.

All Actions

TUI Editor Cursor Movement

Keybinding idDefaultDescription
tui.editor.cursorUpupMove cursor up
tui.editor.cursorDowndownMove cursor down
tui.editor.cursorLeftleft, ctrl+bMove cursor left
tui.editor.cursorRightright, ctrl+fMove cursor right
tui.editor.cursorWordLeftalt+left, ctrl+left, alt+bMove cursor word left
tui.editor.cursorWordRightalt+right, ctrl+right, alt+fMove cursor word right
tui.editor.cursorLineStarthome, ctrl+aMove to line start
tui.editor.cursorLineEndend, ctrl+eMove to line end
tui.editor.jumpForwardctrl+]Jump forward to character
tui.editor.jumpBackwardctrl+alt+]Jump backward to character
tui.editor.pageUppageUpScroll up by page
tui.editor.pageDownpageDownScroll down by page

TUI Editor Deletion

Keybinding idDefaultDescription
tui.editor.deleteCharBackwardbackspaceDelete character backward
tui.editor.deleteCharForwarddelete, ctrl+dDelete character forward
tui.editor.deleteWordBackwardctrl+w, alt+backspaceDelete word backward
tui.editor.deleteWordForwardalt+d, alt+deleteDelete word forward
tui.editor.deleteToLineStartctrl+uDelete to line start
tui.editor.deleteToLineEndctrl+kDelete to line end

TUI Input

Keybinding idDefaultDescription
tui.input.newLineshift+enterInsert new line
tui.input.submitenterSubmit input
tui.input.tabtabTab / autocomplete

TUI Kill Ring

Keybinding idDefaultDescription
tui.editor.yankctrl+yPaste most recently deleted text
tui.editor.yankPopalt+yCycle through deleted text after yank
tui.editor.undoctrl+-Undo last edit

TUI Clipboard and Selection

Keybinding idDefaultDescription
tui.input.copyctrl+cCopy selection
tui.select.upupMove selection up
tui.select.downdownMove selection down
tui.select.pageUppageUpPage up in list
tui.select.pageDownpageDownPage down in list
tui.select.confirmenterConfirm selection
tui.select.cancelescape, ctrl+cCancel selection

TUI Fullscreen Transcript

Keybinding idDefaultDescription
tui.viewport.pageUppageUpScroll transcript up a page
tui.viewport.pageDownpageDownScroll transcript down a page
tui.viewport.topshift+alt+upScroll transcript to top
tui.viewport.followctrl+shift+downScroll to bottom and follow output

Application

Keybinding idDefaultDescription
app.interrupt(none)Interrupt current operation
app.clearctrl+cInterrupt current operation, then exit
app.input.clearescapeClear input
app.exitctrl+dExit (when editor empty)
app.suspendctrl+z (none on Windows)Suspend to background
app.editor.externalctrl+gOpen in external editor ($VISUAL or $EDITOR)
app.clipboard.pasteImagectrl+v (alt+v on Windows)Paste image from clipboard
app.clipboard.copyLoginUrlc, alt+cCopy the sign-in URL from a login dialog

Sessions

Keybinding idDefaultDescription
app.session.new(none)Start a new session (/new)
app.session.tree(none)Open session tree navigator (/tree)
app.session.fork(none)Fork current session (/fork)
app.session.resume(none)Open session resume picker (/resume)

Models and Thinking

Keybinding idDefaultDescription
app.model.selectctrl+lOpen model selector
app.model.toggleScopealt+sToggle between all and scoped models
app.thinking.togglectrl+tCollapse or expand thinking blocks

Configuration Menu

Use tab to cycle forward and shift+tab to cycle backward through Providers, Models, and MCP Connections. Use escape to close the menu. Left and right move the cursor in the active search field.

Keybinding idDefaultDescription
app.configuration.previousTabshift+tabSelect the previous configuration tab

Display and Message Queue

Keybinding idDefaultDescription
app.tools.expandctrl+oCollapse or expand tool output
app.messages.expandctrl+pCollapse or expand agent-to-agent messages
app.message.followUpalt+enterQueue follow-up message
app.message.navigateOlderalt+upSelect the next older pending message
app.message.navigateNeweralt+downSelect the next newer pending message or restore the draft
app.message.moveEarlierctrl+alt+upMove the selected pending message one place earlier in its queue
app.message.moveLaterctrl+alt+downMove the selected pending message one place later in its queue

Tree Navigation

Keybinding idDefaultDescription
app.tree.foldOrUpctrl+left, alt+leftFold current branch segment, or jump to the previous segment start
app.tree.unfoldOrDownctrl+right, alt+rightUnfold current branch segment, or jump to the next segment start or branch end
app.tree.editLabelshift+lEdit the label on the selected tree node
app.tree.toggleLabelTimestampshift+tToggle label timestamps in the tree
app.tree.filter.defaultctrl+dSet tree filter to default view
app.tree.filter.noToolsctrl+tToggle tree filter that hides tool results
app.tree.filter.userOnlyctrl+uToggle tree filter that shows only user messages
app.tree.filter.labeledOnlyctrl+lToggle tree filter that shows only labeled entries
app.tree.filter.allctrl+aToggle tree filter that shows all entries
app.tree.filter.cycleForwardctrl+oCycle tree filter forward
app.tree.filter.cycleBackwardshift+ctrl+oCycle tree filter backward

Scoped Models Selector

Used inside the scoped models selector (opened via /scoped-models).

Keybinding idDefaultDescription
app.models.savectrl+sSave current model selection to settings
app.models.enableAllctrl+aEnable all models (or all matching the current search)
app.models.clearAllctrl+xClear all models (or all matching the current search)
app.models.toggleProviderctrl+pToggle all models for the current provider
app.models.reorderUpalt+upMove the selected model up in the cycle order
app.models.reorderDownalt+downMove the selected model down in the cycle order

Custom Configuration

Create ~/.prime/agent/keybindings.json:

{
  "tui.editor.cursorUp": ["up", "ctrl+p"],
  "tui.editor.cursorDown": ["down", "ctrl+n"],
  "tui.editor.deleteWordBackward": ["ctrl+w", "alt+backspace"]
}

Each action can have a single key or an array of keys. User config overrides defaults.

On native Windows, app.suspend has no default binding because Windows terminals do not support Unix job control. If you bind it manually, Prime Agent shows a status message instead of suspending. In WSL, the normal Linux ctrl+z/fg behavior still applies.

Emacs Example

Binding ctrl+p below releases the conflicting app.messages.expand default; shortcuts in other views keep their defaults.

{
  "tui.editor.cursorUp": ["up", "ctrl+p"],
  "tui.editor.cursorDown": ["down", "ctrl+n"],
  "tui.editor.cursorLeft": ["left", "ctrl+b"],
  "tui.editor.cursorRight": ["right", "ctrl+f"],
  "tui.editor.cursorWordLeft": ["alt+left", "alt+b"],
  "tui.editor.cursorWordRight": ["alt+right", "alt+f"],
  "tui.editor.deleteCharForward": ["delete", "ctrl+d"],
  "tui.editor.deleteCharBackward": ["backspace", "ctrl+h"],
  "tui.input.newLine": ["shift+enter", "ctrl+j"]
}

Vim Example

{
  "tui.editor.cursorUp": ["up", "alt+k"],
  "tui.editor.cursorDown": ["down", "alt+j"],
  "tui.editor.cursorLeft": ["left", "alt+h"],
  "tui.editor.cursorRight": ["right", "alt+l"],
  "tui.editor.cursorWordLeft": ["alt+left", "alt+b"],
  "tui.editor.cursorWordRight": ["alt+right", "alt+w"]
}