Reference
Key bindings
The session UI reads raw keystrokes and turns them into editing actions. These are the keys it recognises today; panto negotiates richer terminal protocols at startup so the important ones (notably Shift+Enter) work wherever the terminal allows.
Editing & cursor
The input box is a multi-line editor. Printable keys insert text (full Unicode), and the usual motion keys move the cursor.
| Key | Action |
|---|---|
| any printable key | Insert the character (multi-byte UTF-8 supported). |
| ← / → | Move the cursor one character. |
| Ctrl+← / Ctrl+→ Alt+← / Alt+→ · Alt+B / Alt+F | Move the cursor by word (terminals vary which form they send). |
| Ctrl+A / Ctrl+E | Jump to the start / end of the current line. |
| Home / End | Jump to the very start / end of the whole input. |
| Backspace | Delete the character before the cursor. |
| Delete | Delete the character under the cursor. |
| Ctrl+W · Alt+Backspace · Ctrl+Backspace | Delete the previous word. |
| Ctrl+U | Delete from the cursor back to the start of the line. |
| paste | Pasted text is inserted literally as one run (bracketed paste), not interpreted key-by-key. |
Submit & newline
| Key | Action |
|---|---|
| Enter | Send the message to the model. |
| Shift+Enter | Insert a newline instead of sending (terminal permitting — see below). |
Whether Shift+Enter inserts a newline depends on your terminal, because in the bare legacy protocol it is indistinguishable from plain Enter. panto works around this where it can — see Terminal protocol.
Selectors & control
Control keys switch the model and reasoning effort mid-session, collapse tool output, hand off to your editor, interrupt a running turn, and exit. The selectors, tool-collapse, and the Esc interrupt stay responsive even while the agent is mid-turn.
| Key | Action |
|---|---|
| Ctrl+M | Open the model selector. |
| Ctrl+R | Open the reasoning-effort selector. |
| Ctrl+O | Collapse / expand all tool-call output. |
| Ctrl+G | Edit the current draft in $EDITOR, then read it back. |
| Esc | Interrupt the running agent turn; dismiss an open selector. |
| Ctrl+C / Ctrl+D | Exit cleanly. |
Selectors are live-only
Picking a model (Ctrl+M) or reasoning level (Ctrl+R) rebuilds the active provider config and applies it to the running agent for this session — nothing is written back toconfig.toml.Terminal protocol
Two TUI behaviours depend on the terminal’s keyboard protocol. panto negotiates the best available at startup and degrades gracefully.
Shift + Enter
In the bare legacy protocol, Enter and Shift+Enter send the same byte. To tell them apart, panto pushes the Kitty keyboard protocol (disambiguate + report-alternates) and queries the terminal; if that’s unavailable it falls back to xterm’s modifyOtherKeys mode (which tmux and xterm honour).
| Terminal | Shift + Enter |
|---|---|
| Kitty, Ghostty, foot (Kitty protocol) | Newline — fully supported. |
| xterm, tmux (modifyOtherKeys) | Newline — via the fallback. |
| macOS Terminal.app (neither) | Indistinguishable from Enter — submits. |
No newline in Terminal.app
On terminals that support neither protocol, Shift+Enter can’t be distinguished from Enter, so it submits. Use a terminal with the Kitty protocol (Ghostty, Kitty, foot) — or tmux — if you want multi-line input.Bracketed paste
panto enables bracketed paste, so multi-line pastes arrive as a single literal block rather than being re-interpreted as a stream of keypresses (a stray newline in a paste won’t submit your message early).
What isn’t here yet
The input model reserves space for richer behaviour — key-release events and super/hyper modifiers under the full Kitty protocol — but those aren’t consumed today, so they’re not bindings yet.