Skip to content

Keys and mouse ​

The composer behaves like a Readline prompt, because that is what people already know. The shell adds the keys that need the whole screen.

A few workflows to try ​

  • Write a multi-line request: type the first line, press Alt-Enter or Shift-Enter, add the next line, then Enter to send the whole draft. Some terminals do not distinguish Shift-Enter; use Alt-Enter in that case.
  • Fix the start of a line: Ctrl-A moves to its start; edit it, then Ctrl-E returns to its end. This is line navigation, not select-all.
  • Reuse a request: from an empty draft, press Up or Ctrl-P to recall a submitted input, edit it, then Enter to send a new request. Ctrl-R searches that input history; it does not search the assistant's answers.
  • Read an earlier answer: scroll with the wheel or Page Up. Esc returns to the bottom without changing your draft.
  • Paste text or a picture: use your terminal's usual paste shortcut for text (Cmd-V on many macOS terminals, Ctrl-Shift-V on many others). Ctrl-V inside ZettCode is specifically for image attachment, not text paste.

Shortcuts depend on what has focus: Enter in a picker selects a row rather than sending a draft, and Esc closes that panel first. For interactive approval and question panels, read the hint printed at the bottom.

Sending ​

KeyWhat it does
EnterSend the draft, or run a slash command.
Alt+Enter, Shift+EnterInsert a newline.
Tab / Shift+TabComplete the slash command being typed.

Editing ​

KeyWhat it does
Ctrl+A / Ctrl+E, Home / EndStart or end of the line.
Ctrl+B / Ctrl+F, Left / RightOne character.
Alt+B / Alt+F, Ctrl+Left / Ctrl+RightOne word.
Ctrl+Home / Ctrl+End, Alt+< / Alt+>Start or end of the whole draft.
Ctrl+U / Ctrl+KDelete to the start or end of the line.
Ctrl+W / Alt+Backspace, Alt+DDelete the previous or next word.
Ctrl+YPaste the last text removed with a line or word deletion.
Ctrl+Z / Ctrl+_Undo the latest edit.
Up / DownMove between draft lines, then through submitted input.
Ctrl+P / Ctrl+NSubmitted input, directly.
Ctrl+RSearch backward through submitted input.

The shell ​

KeyWhat it does
Ctrl+CCopy the selection and clear it; with nothing selected, stop the running request; on an empty request, clear the draft.
Ctrl+DDelete forward — or exit, when the composer is empty and nothing is running.
Ctrl+LRedraw the screen, for a terminal that lost its contents.
Ctrl+TExpand or collapse the newest thinking block.
Ctrl+VAttach an image from the clipboard.
Page Up / Page DownScroll the conversation, keeping the composer focused.
EscJump back to the newest line when scrolled up; close a panel; close the command menu.
TabAccept the highlighted row in a panel or the command menu.

Answering a question ​

While the model waits on a question, these belong to its panel:

KeyWhat it does
Up / DownMove through the choices the model offered.
EnterAct on the highlighted row: choose it (a one-answer question sends it), tick or untick it, or — on the send row — finish a multiple-choice answer. When you have typed instead, it sends what you typed.
Anything you typeEdits the answer line, which is what the model receives; the choices fold away for as long as you type, and Up/Down bring them back.
Esc, Ctrl+CDecline: the model is told the question was cancelled.

Mouse ​

ActionWhat it does
WheelScroll the conversation.
Click a Thinking or Tool rowExpand or collapse it.
Drag in the transcriptSelect text; the selection is copied on release, and dragging past the edge keeps extending it.
Drag on a panel, the header, or the status lineCopy the text painted there, which those surfaces never offered before.
Double-clickSelect the whole row.
Shift+clickExtend the current selection.

Hold your terminal's own modifier key (usually Shift or Alt) if you want the terminal emulator's selection instead of ZettCode's.

Released under the MIT license.