^[control-codes live in libghostty-vt

Private modes

DECPEX Print Extent Mode

Choose what a print operation sends to the printer, and whether it ends with a form feed.

CSI ? 19 h
Defaults
reset
DEC STD 070
§7.7 Set/Reset Print Extent Mode, p. 7-38
VT510
DECPEX—Printer Extent Mode

Two modes of DEC’s printer port extension, which change what a print operation, such as MC’s print screen, sends:

ModeNameSetReset
19DECPEX, print extentprint the whole displayprint only the scrolling region
18DECPFF, print form feedend each print with a form feedno form feed

DECPFF is on p. 7-37 of DEC STD 070, and is DECPFF in the VT510 manual. Neither changes the screen.

xterm keeps both modes, reset by default (its printerExtent and printerFormFeed resources are false, charproc.c), sets them (charproc.c) and reports them through DECRQM (do_dec_rqm), whether or not it has a printer to send to. A default xterm has none (see MC).

libghostty-vt does not have the modes: neither is in its table in modes.zig, so DECRQM reports each as not recognized, 0. Both cases are known differences.

Validation

DECPEX-1: Both reset by default

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

DECPEX-2: Set

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