^[control-codes
live in libghostty-vt

Operating system commands

OSC 112 Reset Text Cursor Color

View as Markdown

Put the text cursor color back as it started.

OSC 112 ST
ECMA-48
§8.3.89 OSC – Operating System Command, p. 51
xterm
Operating System Commands

OSC 112 ST puts the color of the text cursor, OSC 12, back as the terminal started it, undoing any change made with OSC 12 ; Pt ST. xterm resets it to the value it started with (ResetColorsRequest).

It takes no parameter. xterm ignores an OSC 112 that carries anything after the number, OSC 112 ; 1 ST say, as a malformed sequence (do_osc); an empty one, OSC 112 ; ST, is the same as none.

libghostty-vt has it, and agrees with xterm.

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-411aYes
libghostty-vt0f171f6Yes
Konsole26.11.70, a24c3d71Yes
kitty0.49.1, run in a VMYespasses the 2 cases that show it working; ends its replies with ST where xterm uses BEL
foot1.28.0, run in a VMYespasses the 2 cases that show it working
pyte0.8.2, run as a libraryNofails 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 libraryYespasses the 2 cases that show it working
ConEmubuild 230724, its documentationNonot in its ANSI escape codes
rxvt-unicode9.31, run in a VMPartlyfails OSC112-1 of the 2 cases that show it working
VTE0.84.1, run as a libraryPartlyfails OSC112-2 of the 2 cases that show it working

Validation

OSC112-1: After a change

\e]12;red\a
\e]112\a
\e]12;?\a
|____|
reply \e]12;rgb:0000/0000/0000\a

OSC112-2: Back to where it started, not to the foreground

\e]10;blue;red;red\a  # foreground, background, cursor
\e]112\a
\e]12;?\a
|____|
reply \e]12;rgb:0000/0000/0000\a
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.