DECPEX, DECPFF Printer Modes
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:
| Mode | Name | Set | Reset |
|---|---|---|---|
19 | DECPEX, print extent | print the whole display | print only the scrolling region |
18 | DECPFF, print form feed | end each print with a form feed | no 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
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | Yes | §4.6.17 Print Extent Mode (DECPEX) and §4.6.16 Print Form Feed Mode (DECPFF) |
| VT510 | manual, 1st ed., 1993 | Yes | DECPEX and DECPFF |
| xterm | patch 412, xterm-411a | Yes | keeps and reports both modes; a default xterm has no printer |
| libghostty-vt | 0f171f6 | No | neither is in its mode table; DECRQM reports 0 (DECPEX-1, DECPEX-2) |
| kitty | 0.49.1, run in a VM | No | fails the 2 cases that show it working |
| foot | 1.28.0, run in a VM | No | fails the 2 cases that show it working |
| xterm.js headless | 6.0.0, run as a library | No | fails the 2 cases that show it working |
| alacritty_terminal | 0.26.0, run as a library | No | fails the 2 cases that show it working |
| ConEmu | build 230724, its documentation | No | not in ConEmu’s list, ANSI escape codes |
| rxvt-unicode | 9.31, run in a VM | No | fails the 2 cases that show it working |
| VTE | 0.84.1, run as a library | No | fails 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