Pi coding agent keyboard shortcuts
Pi's keyboard model separates the message you are writing from the work already running. These keys handle session control, model and thinking changes, queued messages, and editing the current prompt.
Pi separates the prompt you are writing from the work already in progress. Start with session control and prompt editing, then add model, thinking, and queued-message keys when you begin steering longer runs.
Session control
Interrupt, clear, exit, or change the current pi session without losing the terminal.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Clear the editor, or exit on the second press | CtrlC | CtrlC | CtrlC |
| Exit when the editor is empty | CtrlD | CtrlD | CtrlD |
| Cancel autocomplete or abort streaming | Esc | Esc | Esc |
| Open the session tree to jump to an earlier point | EscEsc | EscEsc | EscEsc |
| Suspend to the backgroundResume with fg in the shell. | CtrlZ | CtrlZ | CtrlZ |
Models and thinking
Switch models, providers, and thinking levels while the prompt remains available.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Open the model selector | CtrlL | CtrlL | CtrlL |
| Cycle scoped models forwardShift+Ctrl+P cycles backward. | CtrlP | CtrlP | CtrlP |
| Cycle the thinking level | ShiftTab | ShiftTab | ShiftTab |
| Toggle tool output expansion | CtrlO | CtrlO | CtrlO |
| Toggle thinking block visibility | CtrlT | CtrlT | CtrlT |
Message queue
While the agent works, Enter queues a steering message delivered after the current tool call, and Alt+Enter queues a follow-up for after all work finishes.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Send now, or queue a steering message while busy | Enter | Enter | Enter |
| Queue a follow-up message | AltEnter | AltEnter | AltEnter |
| Abort and restore queued messages to the editor | Esc | Esc | Esc |
Editing and input
Move through the prompt, edit text, open history, and insert a line without sending it.
| Action | Windows | macOS | Linux |
|---|---|---|---|
| Complete paths or accept autocomplete | Tab | Tab | Tab |
| Fuzzy search project files to reference | @ | @ | @ |
| Edit the message in your external editorUses VISUAL or EDITOR. | CtrlG | CtrlG | CtrlG |
| Paste an image from the clipboard | CtrlV | CtrlV | CtrlV |
| Delete one word backwardsOption+Backspace does the same on macOS. | CtrlW | CtrlW | CtrlW |
| Delete to the start of the line | CtrlU | CtrlU | CtrlU |
| Delete to the end of the line | CtrlK | CtrlK | CtrlK |
Make the useful keys stick
Pi is easier to trust when the prompt and the running task do not compete for attention. Learn the keys that let you pause, edit, and steer, then add the model controls when you need them.
You do not need this whole page in your head. Pick two shortcuts that remove a repeated hand movement, use them until they feel ordinary, and come back for the next pair.