Keybindings
PiG reads keybindings from ~/.pig/agent/keybindings.json. The file is optional.
If it is absent, PiG uses the defaults in this page.
Each entry maps one action to one or more keys. To change a binding, write the action name and the keys you want:
{
"app.tools.expand": ["ctrl+e"],
"app.session.tree": ["ctrl+shift+t"]
}A binding in the file replaces the default for that action. It does not add to
it. Bindings you do not name keep their defaults. Set an action to [] to leave
the action with no key.
Set PIG_CODING_AGENT_DIR to read the file from a different directory.
Use /hotkeys to list the keys that are active in the current session.
If two actions claim the same key, PiG records the conflict and keeps both bindings. Both actions then answer that key, so give one of them a different key.
Defaults
The keys below are the macOS defaults. Platform differences are listed after the tables.
Session control
Action | Default key | Effect |
app.clear | ctrl+c | Clear editor |
app.exit | ctrl+d | Exit when editor is empty |
app.interrupt | escape | Cancel or abort |
app.session.delete | ctrl+d | Delete session |
app.session.deleteNoninvasive | ctrl+backspace | Delete session when query is empty |
app.session.fork | none | Fork current session |
app.session.new | none | Start a new session |
app.session.rename | ctrl+r | Rename session |
app.session.resume | none | Resume a session |
app.session.toggleNamedFilter | ctrl+n | Toggle named session filter |
app.session.togglePath | ctrl+p | Toggle session path display |
app.session.toggleSort | ctrl+s | Toggle session sort mode |
app.session.tree | none | Open session tree |
app.suspend | ctrl+z | Suspend to background |
Editing and messages
Action | Default key | Effect |
app.clipboard.pasteImage | ctrl+v | Paste image from clipboard (text fallback) |
app.editor.external | ctrl+g | Open external editor |
app.message.copy | ctrl+x | Copy message to clipboard |
app.message.dequeue | alt+up | Restore queued messages |
app.message.followUp | alt+enter | Queue follow-up message |
Models
Action | Default key | Effect |
app.model.cycleBackward | shift+ctrl+p | Cycle to previous model |
app.model.cycleForward | ctrl+p | Cycle to next model |
app.model.select | ctrl+l | Open model selector |
app.models.clearAll | ctrl+x | Clear all models |
app.models.enableAll | ctrl+a | Enable all models |
app.models.reorderDown | alt+down | Move model down in order |
app.models.reorderUp | alt+up | Move model up in order |
app.models.save | ctrl+s | Save model selection |
app.models.toggleProvider | ctrl+p | Toggle all models for provider |
Display
Action | Default key | Effect |
app.thinking.cycle | shift+tab | Cycle thinking level |
app.thinking.toggle | ctrl+t | Toggle thinking blocks |
app.tools.expand | ctrl+o | Toggle tool details |
Session tree
Action | Default key | Effect |
app.tree.editLabel | shift+l | Edit tree label |
app.tree.filter.all | ctrl+a | Tree filter: show all entries |
app.tree.filter.cycleBackward | shift+ctrl+o | Tree filter: cycle backward |
app.tree.filter.cycleForward | ctrl+o | Tree filter: cycle forward |
app.tree.filter.default | ctrl+d | Tree filter: default view |
app.tree.filter.labeledOnly | ctrl+l | Tree filter: labeled entries only |
app.tree.filter.noTools | ctrl+t | Tree filter: hide tool results |
app.tree.filter.userOnly | ctrl+u | Tree filter: user messages only |
app.tree.foldOrUp | alt+left, ctrl+left | Fold tree branch or move up |
app.tree.toggleLabelTimestamp | shift+t | Toggle tree label timestamps |
app.tree.unfoldOrDown | alt+right, ctrl+right | Unfold tree branch or move down |
Platform differences
Some actions use a different key on each platform, because the terminal or the operating system reserves the macOS key.
Action | macOS | Linux | Windows |
app.clipboard.pasteImage | ctrl+v | ctrl+v | alt+v |
app.suspend | ctrl+z | ctrl+z | none |
app.message.dequeue | alt+up | alt+up | alt+q |
app.message.followUp | alt+enter | alt+enter | ctrl+q |
app.model.cycleBackward | shift+ctrl+p | shift+ctrl+p | alt+p |
app.tree.foldOrUp | alt+left, ctrl+left | ctrl+left, alt+left | ctrl+left, alt+left |
app.tree.unfoldOrDown | alt+right, ctrl+right | ctrl+right, alt+right | ctrl+right, alt+right |
Actions with no default key
These actions exist but have no key until you assign one. Reach them with their
slash command, or bind them in keybindings.json.
Action | Slash command |
app.session.fork | /fork |
app.session.new | /new |
app.session.resume | /resume |
app.session.tree | /tree |
Key names
Write a key as its name, or as modifiers joined to the name with +. Use
ctrl, alt and shift for modifiers. Examples: ctrl+o, shift+ctrl+p,
alt+enter, escape, ctrl+backspace.
Terminals do not all report the same keys. If a binding does not respond, the terminal usually consumed the key before PiG saw it. See terminal setup.
Related
- Using PiG lists the slash commands.
- Settings lists the files and settings PiG reads.
- Terminal setup covers keys the terminal intercepts.