^[control-codes live in libghostty-vt

Private modes

DECSDM Sixel Display Mode

Choose whether a sixel image scrolls with the text from the cursor, or is drawn from the top left corner.

CSI ? 80 h
Defaults
reset
VT330/VT340
§14.4 Sixel Scrolling Mode
xterm
Sixel Display Mode (DECSDM)

Mode 80 decides where a sixel image is drawn. With sixel scrolling, the image starts at the text cursor, the screen scrolls when it reaches the bottom margin, and when the image ends the text cursor is left where the sixels stopped. Without it, in sixel display mode, the image starts at the top left corner of the screen, cannot scroll, and the text cursor stays where it was.

Which of the two set means is a contradiction in DEC’s own documents. The VT330/VT340 manual says that “when sixel display mode is set, the Sixel Scrolling feature is enabled” (§14.4.3), the opposite of the mode’s name. The VT382 manuals have it the other way round: set is display mode, with no scrolling. xterm followed the VT330/VT340 manual until patch 369, which inverted it “to correspond with VT382 manuals” (xterm.log.html), so in xterm today CSI ? 80 l turns sixel scrolling on, and a program that sends an image to be scrolled with the text sends that first.

In xterm, the mode is reset to begin with, because its sixelScrolling resource is true by default (charproc.c), and RIS puts it back to that. It can be set or reset only when sixel graphics are on (charproc.c), which in a default xterm, a VT420, they are not. DECRQM reports the mode all the same (misc.c), so a default xterm answers that it is reset, whatever was sent. The cases follow it, as the sources page explains.

xterm has two more modes for sixels, each its own: 1070 gives each image its own color registers, and 8452 leaves the cursor to the right of an image rather than below it.

Not in libghostty-vt

libghostty-vt has no sixel graphics and no mode 80: it is not in the table in modes.zig, so DECRQM reports it as not recognized (0). Both cases are known differences.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Nothe VT220 has no graphics
VT340manual, vol. 2, 2nd ed., 1988Yes§14.4 Sixel Scrolling Mode; set enables sixel scrolling, the reverse of xterm
VT510manual, 1st ed., 1993Nothe VT510 manual has no sixel graphics
xtermpatch 412, xterm-411aPartlyreported, reset, but set or reset only when sixel graphics are on, which in a default xterm they are not
libghostty-vt83edd49Nono mode 80 (DECSDM-1, DECSDM-2)
Konsole26.11.70, a24c3d71Yesset turns sixel scrolling off, as in xterm; no DECRQM (Vt102Emulation.cpp)
ConEmubuild 230724, its documentationNonot in ConEmu’s list, ANSI escape codes

Validation

DECSDM-1: Reset by default

\e[?80$p
|_____|
reply \e[?80;2$y

DECSDM-2: Setting it is ignored without sixel graphics

\e[?80h
\e[?80$p
|_____|
reply \e[?80;2$y
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.