^[control-codes live in libghostty-vt

Operating system commands

OSC 666 Set Terminal Property

Set, reset or signal VTE's typed terminal properties, which the program embedding VTE can watch.

OSC 666 ; Pt ST
ECMA-48
§8.3.89 OSC – Operating System Command, p. 51
Specification
Terminal properties, VTE source

OSC 666 is VTE’s, the library inside GNOME Terminal and others, from 0.78. It sets termprops: named, typed variables, a boolean, an integer, a color, a string, a URI and so on, which the application embedding VTE watches through a signal. Pt is one or more statements separated by ;:

StatementEffect
name=valueset it
namereset it; a name ending in . resets every one with that prefix
name!signal a termprop that has no value
name?query it

Only registered names do anything, and a value of the wrong type resets the termprop. A program’s own termprops are named vte.ext. and the terminal’s name; VTE’s own include vte.cwd, the shell’s vte.shell.precmd, preexec and postexec, and vte.progress.hint and vte.progress.value. For now the answer to a query is always an empty OSC 666 ST, whatever was asked, for security. VTE accepts the sequence only when it ends with ST, not BEL, and RIS, DECSTR and DECSR reset every termprop. VTE documents it in its source rather than its published reference (vtegtk.cc, vteseq.cc).

A default xterm has no OSC 666 and ignores it (the OSC numbers it knows). The cases follow xterm.

libghostty-vt does not recognize OSC 666 either: its OSC parser in osc.zig has no state for the number, so the string is dropped, and the cases pass.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984NoOSC is not among the controls it recognizes (§4.2)
VT510manual, 1st ed., 1993Noignores an OSC string (chapter 4)
xtermpatch 412, xterm-411aNoignored
libghostty-vt83edd49Noignored
Konsole26.11.70, a24c3d71Nonot among the OSC numbers it handles (Vt102Emulation.h)
ConEmubuild 230724, its documentationNonot in its ANSI escape codes
VTE0.84.1, sourceYessince 0.78; ST only, and a query is answered with an empty OSC 666 ST (vtegtk.cc)

Validation

OSC666-1: Setting one changes nothing on screen

A
\e]666;vte.progress.value=50\e\\
B
|AB____|
cursor 1,3
reply none

OSC666-2: A query is not answered

\e]666;vte.progress.value?\e\\
|______|
reply none
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.