^[control-codes live in libghostty-vt

Device control strings

ReGIS Remote Graphic Instruction Set

Enter DEC's vector graphics language, whose commands draw lines, curves and text until ST.

DCS Pm p commands ST
Defaults
Pm = 0
VT330/VT340
§1.8 Entering and Exiting ReGIS

ReGIS is DEC’s language for vector graphics: commands such as P[100,100] to move the graphics cursor, V[200,200] to draw a line to a point, C for circles and arcs, T for text, and S(E) to erase the screen. A device control string with the final byte p, and no intermediate byte, enters it, and ST leaves it. The VT330/VT340 manual describes the language in its first thirteen chapters, and how it is entered in §1.8. The parameter says where to begin and whether to echo what is received:

PmBeginsDisplays the commands
0, or nonewhere ReGIS was last leftno
1at a new commandno
2where ReGIS was last lefton the bottom line
3at a new commandon the bottom line

The bottom-line display, command display mode, shows the commands as they are received, up to 80 characters, and is cleared by a line feed.

The VT125, the VT240 and the VT330 and VT340 have ReGIS; the VT510 does not. xterm has it only when built with --enable-regis-graphics, which configure leaves off (configure.in), and then only as a graphics terminal, as for sixels. A default xterm collects the string and drops it at ST (misc.c). Nothing is drawn, nothing is displayed on the bottom line, and that is what the cases expect, as the sources page explains.

The same final byte has a second use: tmux’s control mode is entered with DCS 1000 p, a ReGIS string with a parameter ReGIS does not define.

Not in libghostty-vt

libghostty-vt has no ReGIS. The only DCS p its handler in dcs.zig recognizes is tmux’s DCS 1000 p, and only in a build with tmux control mode; any other is dropped. That is what a default xterm does, so both cases pass.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Nothe VT220 has no graphics
VT340manual, vol. 2, 2nd ed., 1988Yes§1.8 Entering and Exiting ReGIS
VT510manual, 1st ed., 1993Nothe VT510 manual has no ReGIS
xtermpatch 412, xterm-411aNoconsumed and ignored; ReGIS needs --enable-regis-graphics, off by default
libghostty-vt83edd49Nothe string is dropped; only tmux’s DCS 1000 p is recognized
Konsole26.11.70, a24c3d71Nono ReGIS; its DCS hook handles only sixels
ConEmubuild 230724, its documentationNonot in ConEmu’s list, which has no DCS; ANSI escape codes

Validation

REGIS-1: Nothing is drawn

A
\eP1pS(E)P[100,100]V[200,200]\e\\   # erase, then draw a line
B
|AB____|
|______|
cursor 1,3
reply none

REGIS-2: Command display mode shows nothing either

A
\eP3pP[100,100]V[200,200]\e\\
|A_____|
|______|
|______|
cursor 1,2
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.