^[control-codes
live in libghostty-vt

C0 control characters

DC1, DC3 Device Control One and Three

View as Markdown

XON and XOFF: flow control for what the terminal sends, with no effect on the screen.

DC1 Device Control One

DC1
ECMA-48
§8.3.28 DC1 – Device Control One, p. 38
DEC STD 070
§5.9.1 C0 Control Characters, p. 5-129
VT220
§4.2 Control Characters
VT510
4.2 Control Characters

ECMA-48 defines DC1 and DC3 (11 and 13) loosely, as turning an “ancillary device” on and off, and notes that “when used for data flow control” they are “X-ON” and “X-OFF”. DC3 is ECMA-48 §8.3.30, p. 39.

A DEC terminal uses them that way, and they act on the terminal’s sending. DEC STD 070 says XOFF “causes terminal to stop transmitting all codes except XOFF and XON”, and XON “causes terminal to resume transmitting”, in both cases only “if XOFF handling is enabled”. The VT510 manual says the same when flow control is enabled in its setup. Neither changes anything on the screen.

xterm’s parser table maps both to CASE_IGNORE, and libghostty-vt ignores them too.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Yes§4.2 Control Characters, if XOFF support is enabled
VT510manual, 1st ed., 1993YesTable 4–1, if XON/XOFF is enabled in setup
xtermpatch 412, xterm-411aYesignored; nothing on the screen changes
libghostty-vt0f171f6Yesignored; nothing on the screen changes

Validation

DC1-1: Nothing on the screen

A
\x11      # DC1, XON
B
\x13      # DC3, XOFF
C
|ABC__|
cursor 1,4
reply none

DC1-2: Ignored inside a control sequence

\e[2\x11;3H  # CUP, with an XON inside it
X
|_____|
|__X__|
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.