Pi coding agent keyboard shortcuts

Pi's keyboard model separates the prompt you are writing from the agent work already running. This reference covers the current editor, queue, session, model, thinking, transcript, tree, and application defaults.

Windows, macOS, Linux · 69 shortcuts

Application control

Clear, interrupt, quit, suspend, open an external editor, and move clipboard content into the current Pi session.

ActionWindowsmacOSLinux
Clear the editor, or quit on the second pressCtrlCCtrlCCtrlC
Quit when the editor is emptyCtrlDCtrlDCtrlD
Cancel autocomplete or abort streamingEscEscEsc
Suspend Pi to the backgroundNative Windows has no default suspend binding. WSL follows the Linux behavior; use fg to resume on Unix-like shells.Not documentedCtrlZCtrlZ
Open the prompt in an external editorUses externalEditor, VISUAL, EDITOR, Notepad on Windows, or nano elsewhere.CtrlGCtrlGCtrlG
Paste text or an imageAlt+V is the Windows and WSL fallback.CtrlVorAltVCtrlVorAltVCtrlVorAltV
Copy the last assistant messageCtrlXCtrlXCtrlX

Models, thinking, and tools

Choose a model, cycle a scoped model list, change thinking level, and control how tool output or thinking blocks are shown.

ActionWindowsmacOSLinux
Open the model selectorCtrlLCtrlLCtrlL
Cycle scoped models forwardShift+Ctrl+P cycles backward. Alt+P is the Windows and WSL backward binding.CtrlPCtrlPCtrlP
Cycle scoped models backwardShiftCtrlPorAltPShiftCtrlPorAltPShiftCtrlPorAltP
Cycle the thinking levelShiftTabShiftTabShiftTab
Collapse or expand thinking blocksCtrlTCtrlTCtrlT
Collapse or expand tool outputCtrlOCtrlOCtrlO

Prompt cursor and history

Move through the prompt by character, word, line, page, or history entry while preserving the distinction between editing and sending.

ActionWindowsmacOSLinux
Move up or browse older history at the topUpUpUp
Move down or browse newer history at the bottomDownDownDown
Move left one characterLeftorCtrlBLeftorCtrlBLeftorCtrlB
Move right one characterRightorCtrlFRightorCtrlFRightorCtrlF
Move left one wordAltLeftorCtrlLeftorAltBAltLeftorCtrlLeftorAltBAltLeftorCtrlLeftorAltB
Move right one wordAltRightorCtrlRightorAltFAltRightorCtrlRightorAltFAltRightorCtrlRightorAltF
Move to the line startHomeorCtrlHomeorCtrlAHomeorCtrlHomeorCtrlAHomeorCtrlHomeorCtrlA
Move to the line endEndorCtrlEndorCtrlEEndorCtrlEndorCtrlEEndorCtrlEndorCtrlE
Jump forward to a characterCtrl]Ctrl]Ctrl]
Jump backward to a characterCtrlAlt]CtrlAlt]CtrlAlt]
Scroll the editor up by a pagePageUporCtrlPageUpPageUporCtrlPageUpPageUporCtrlPageUp
Scroll the editor down by a pagePageDownorCtrlPageDownPageDownorCtrlPageDownPageDownorCtrlPageDown

Editing, queue, and multiline input

Delete text, use the kill ring, insert new lines, complete paths, and decide whether a message steers the current run or follows it.

ActionWindowsmacOSLinux
Delete the previous characterBackspaceBackspaceBackspace
Delete the next characterDeleteorCtrlDDeleteorCtrlDDeleteorCtrlD
Delete the previous wordCtrlWorAltBackspaceCtrlWorAltBackspaceCtrlWorAltBackspace
Delete the next wordAltDorAltDeleteAltDorAltDeleteAltDorAltDelete
Delete to the line startCtrlUCtrlUCtrlU
Delete to the line endCtrlKCtrlKCtrlK
Paste the most recently deleted textCtrlYCtrlYCtrlY
Cycle through deleted text after yankingAltYAltYAltY
Undo the last editAlt+Z is the documented WSL fallback.CtrlZCtrl-Ctrl-
Insert a line without submittingWindows Terminal may need Ctrl+Enter instead of Shift+Enter.ShiftEnterorCtrlJorCtrlEnterShiftEnterorCtrlJorCtrlEnterShiftEnterorCtrlJorCtrlEnter
Complete a path or accept autocompleteTabTabTab
Send now, or queue a steering message while busyEnterEnterEnter
Queue a follow-up after the current work finishesCtrl+Q is the Windows and WSL binding. Windows Terminal may reserve Alt+Enter for full-screen.AltEnterorCtrlQAltEnterorCtrlQAltEnterorCtrlQ
Restore queued messages to the editorAlt+Q is the Windows and WSL binding.AltUporAltQAltUporAltQAltUporAltQ

Fullscreen transcript

When fullscreen TUI mode is active, use these transcript bindings to search rendered output and jump between marked prompts.

ActionWindowsmacOSLinux
Scroll the transcript up by a pagePageUpPageUpPageUp
Scroll the transcript down by a pagePageDownPageDownPageDown
Jump to the previous marked promptCtrlUpCtrlShiftUpCtrlShiftUp
Jump to the next marked promptCtrlDownCtrlShiftDownCtrlShiftDown
Select the next transcript search matchEnterorCtrlGEnterorCtrlGEnterorCtrlG
Select the previous transcript search matchShiftEnterorCtrlShiftGShiftEnterorCtrlShiftGShiftEnterorCtrlShiftG
Close transcript searchEscEscEsc
Scroll to the start of the transcriptHomeHomeHome
Scroll to the end and follow new outputEndEndEnd

Session tree and filters

Use the session tree and its filters to move between branches, label entries, and control which messages or tool results remain visible.

ActionWindowsmacOSLinux
Toggle session path displayCtrlPCtrlPCtrlP
Toggle session sort modeCtrlSCtrlSCtrlS
Toggle the named-only session filterCtrlNCtrlNCtrlN
Fold a branch segment or jump to its previous startCtrlLeftorAltLeftCtrlLeftorAltLeftCtrlLeftorAltLeft
Unfold a branch segment or jump to its next endCtrlRightorAltRightCtrlRightorAltRightCtrlRightorAltRight
Edit the selected tree labelShiftLShiftLShiftL
Toggle tree label timestampsShiftTShiftTShiftT
Use the default tree filterCtrlDCtrlDCtrlD
Toggle the no-tools tree filterCtrlTCtrlTCtrlT
Toggle the user-only tree filterCtrlUCtrlUCtrlU
Toggle the labeled-only tree filterCtrlLCtrlLCtrlL
Show all tree entriesCtrlACtrlACtrlA
Cycle tree filters forwardCtrlOCtrlOCtrlO
Cycle tree filters backwardCtrlShiftOCtrlShiftOCtrlShiftO

Scoped model selector

Inside the scoped-models selector, save the selection, toggle providers, and reorder the models used by the cycling shortcut.

ActionWindowsmacOSLinux
Save the current model selectionCtrlSCtrlSCtrlS
Enable all matching modelsCtrlACtrlACtrlA
Clear all matching modelsCtrlXCtrlXCtrlX
Toggle all models for the providerCtrlPCtrlPCtrlP
Move the selected model upAltUpAltUpAltUp
Move the selected model downAltDownAltDownAltDown

Make a printable Pi coding agent sheet