From b350e4dee2412e450b3844061f5c1bc2ec995923 Mon Sep 17 00:00:00 2001 From: t Date: Mon, 6 Jul 2026 15:00:37 -0600 Subject: catch up with latest panto cli developments --- keybindings.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keybindings.html') diff --git a/keybindings.html b/keybindings.html index 09739d8..747db1f 100644 --- a/keybindings.html +++ b/keybindings.html @@ -20,9 +20,9 @@
Source
- +
-

Reference

Key bindings

TUI input

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.

KeyAction
any printable keyInsert 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+EJump to the start / end of the current line.
Home / EndJump to the very start / end of the whole input.
BackspaceDelete the character before the cursor.
DeleteDelete the character under the cursor.
Ctrl+W · Alt+Backspace · Ctrl+BackspaceDelete the previous word.
Ctrl+UDelete from the cursor back to the start of the line.
pastePasted text is inserted literally as one run (bracketed paste), not interpreted key-by-key.

Submit & newline

KeyAction
EnterSend the message to the model.
Shift+EnterInsert 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.

KeyAction
Ctrl+MOpen the model selector.
Ctrl+ROpen the reasoning-effort selector.
Ctrl+OCollapse / expand all tool-call output.
Ctrl+GEdit the current draft in $EDITOR, then read it back.
EscInterrupt the running agent turn; dismiss an open selector.
Ctrl+C / Ctrl+DExit 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 to config.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).

TerminalShift + 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.
+

Reference

Key bindings

TUI input

The session UI reads raw keystrokes and negotiates richer terminal keyboard protocols at startup. These are the bindings the current TUI recognizes.

Editing & cursor

The input box is multi-line and accepts full UTF-8 text. Pasted text arrives as one literal block via bracketed paste.

KeyAction
any printable keyInsert text at the cursor.
/ Move one character.
Alt+B / Alt+F
Ctrl+ / Ctrl+
Move by word. Terminals vary in which encoding they send; panto accepts the common ones.
Ctrl+A / Ctrl+EJump to start / end of the current line.
Backspace / DeleteDelete backward / forward.
Ctrl+U / Ctrl+WDelete to line start / delete previous word.
pasteInsert the pasted bytes literally; pasted newlines do not auto-submit.

Submit & newline

KeyAction
EnterSubmit the current input.
Shift+EnterInsert a newline when the terminal can report it distinctly.

Whether Shift+Enter works depends on keyboard-protocol support. panto negotiates Kitty first, then falls back to xterm modifyOtherKeys.

Selectors & control

KeyAction
Ctrl+TOpen the model selector.
Ctrl+ROpen the reasoning selector.
Ctrl+OCollapse / expand all tool output.
Ctrl+GEdit the current draft in $EDITOR (or [tui] editor).
EscInterrupt the running turn, close an open selector, or clear the input when idle.
Ctrl+C / Ctrl+DExit cleanly.

Selectors are filterable: type to narrow the list, move with / or Ctrl+N/Ctrl+P, and accept with Enter (or Tab for completion-style pickers).

Selectors are session-local

Choosing a model or reasoning level changes the live session only. Nothing is written back to config.toml or models.toml.

Terminal protocol

panto enables bracketed paste and probes for keyboard protocol support at startup.

Shift + Enter

With the legacy terminal protocol, Enter and Shift+Enter are the same byte. panto pushes the Kitty keyboard protocol and queries the terminal; if that is unavailable it falls back to xterm modifyOtherKeys.

TerminalShift + Enter
Kitty, Ghostty, footSupported via Kitty keyboard protocol.
xterm, tmuxSupported via modifyOtherKeys fallback.
Terminal.app and similarIndistinguishable from Enter, so it submits.

Bracketed paste

Bracketed paste means multi-line pastes are inserted literally instead of being reinterpreted as a sequence of keypresses.

-- cgit v1.3