^[control-codes
live in libghostty-vt

Private modes

DECPEX, DECPFF Printer Modes

View as Markdown

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

DECPEX Print Extent Mode

CSI ? 19 h/l

DECPFF Print Form Feed Mode

CSI ? 18 h/l
Defaults
reset
DEC STD 070
§7.7 Set/Reset Print Extent Mode, p. 7-38
VT220
§4.6.17 Print Extent Mode (DECPEX)
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.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Yes§4.6.17 Print Extent Mode (DECPEX) and §4.6.16 Print Form Feed Mode (DECPFF)
VT510manual, 1st ed., 1993YesDECPEX and DECPFF
xtermpatch 412, xterm-411aYeskeeps and reports both modes; a default xterm has no printer
libghostty-vt0f171f6Noneither is in its mode table; DECRQM reports 0 (DECPEX-1, DECPEX-2)
kitty0.49.1, run in a VMNofails the 2 cases that show it working
foot1.28.0, run in a VMNofails the 2 cases that show it working
xterm.js headless6.0.0, run as a libraryNofails the 2 cases that show it working
alacritty_terminal0.26.0, run as a libraryNofails the 2 cases that show it working
ConEmubuild 230724, its documentationNonot in ConEmu’s list, ANSI escape codes
rxvt-unicode9.31, run in a VMNofails the 2 cases that show it working
VTE0.84.1, run as a libraryNofails the 2 cases that show it working

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.