Control-Function Conformance¶
Per-profile control-function and mode conformance derived from
libvt.codec, libvt.modes, and libvt.profiles, verified
against the recorded differential corpus in tests/fixtures/ghostty_corpus/
and compiled libghostty-vt (LIBGHOSTTY_VT_PATH).
Status values:
Supported: Implemented across profiles per ECMA-48, DEC STD 070, VT500, or the referenced host protocol.
Partial: Parsed and handled for core subcommands or event emission; unmodeled subcommands are ignored or reported as unhandled.
Ignored: Parsed cleanly and ignored (or gated off by profile/policy).
Divergent: Behavior varies intentionally across host profiles (
DEFAULT_PROFILE,GHOSTTY_PROFILE,KITTY_PROFILE,XTERM_PROFILE,LINUX_CONSOLE_PROFILE, andtmux_profile()).
C0 Controls¶
Mnemonic |
Byte |
Status |
Profile notes & test modules |
|---|---|---|---|
|
|
Supported |
Emits |
|
|
Supported |
Clears |
|
|
Supported |
Advances to next tab stop or right margin; |
|
|
Supported |
Line feed (adds |
|
|
Supported |
Treated as |
|
|
Supported |
Treated as |
|
|
Supported |
Moves cursor to left margin and clears |
|
|
Supported |
Shifts |
|
|
Supported |
Shifts |
ESC, DCS, and APC Sequences¶
Family |
Mnemonic |
Status |
Profile notes & test modules |
|---|---|---|---|
|
|
Supported |
Designates |
|
|
Divergent |
|
|
|
Divergent |
Tracks cell-aligned placements (respects |
|
|
Divergent |
Replies with active SGR/margins/style; disabled on |
|
|
Divergent |
Replies with hex-encoded capabilities; disabled on |
|
|
Supported |
Tracks Kitty graphics |
CSI Control Functions¶
Final / Form |
Mnemonic |
Status |
Profile notes & test modules |
|---|---|---|---|
|
|
Supported |
Inserts BCE blanks within active margins; |
|
|
Supported |
Moves cursor up within scroll margins; |
|
|
Supported |
Moves cursor down within scroll margins; |
|
|
Supported |
Moves cursor right within active margins; |
|
|
Supported |
Moves cursor left within active margins; |
|
|
Supported |
Moves cursor down and to left margin; |
|
|
Supported |
Moves cursor up and to left margin; |
|
|
Supported |
Sets cursor column (1-based); |
|
|
Supported |
Sets cursor |
|
|
Supported |
Advances |
|
|
Divergent |
|
|
|
Divergent |
BCE erase in line; scalar |
|
|
Divergent |
Inserts lines within scroll region; |
|
|
Divergent |
Deletes lines within scroll region; |
|
|
Supported |
Deletes characters within active margins; |
|
|
Divergent |
Scrolls region up (pushes primary scrollback when full-screen; |
|
|
Supported |
Scrolls region down; |
|
|
Supported |
Erases |
|
|
Divergent |
Backward tab stops; |
|
|
Supported |
Horizontal position absolute; |
|
|
Divergent |
Horizontal position relative; ignored on |
|
|
Divergent |
Repeats previous printable cluster; |
|
|
Divergent |
Emits |
|
|
Supported |
Vertical position absolute; |
|
|
Divergent |
Vertical position relative; ignored on |
|
|
Supported |
Same positioning semantics as |
|
|
Supported |
Clears current or all tab stops ( |
|
|
Supported |
Sets ANSI modes ( |
|
|
Supported |
Resets ANSI modes ( |
|
|
Supported |
Attributes, 16/256/RGB colors, T.416 |
|
|
Supported |
Device status ( |
|
|
Divergent |
|
|
|
Supported |
Sets top/bottom scroll margins and homes cursor; |
|
|
Divergent |
Sets left/right margins when |
|
|
Partial |
Supports title stack push/pop ( |
|
|
Divergent |
Restores cursor ( |
|
|
Supported |
Sets supported DEC private modes; |
|
|
Supported |
Resets supported DEC private modes; |
|
|
Supported |
Reports mode status ( |
|
|
Divergent |
Emits |
|
|
Supported |
Marks subsequent cells protected/unprotected against |
|
|
Supported |
Selective erase in display respecting |
|
|
Supported |
Selective erase in line respecting |
|
|
Divergent |
Saves current DEC private mode values; ignored on |
|
|
Divergent |
Restores saved DEC private mode values; ignored on |
|
|
Divergent |
Stateful color-register and pixel-geometry queries; disabled on |
OSC Sequences¶
Code |
Mnemonic |
Status |
Profile notes & test modules |
|---|---|---|---|
|
|
Supported |
Updates window title and emits |
|
|
Supported |
Emits |
|
|
Supported |
Updates window title and emits |
|
|
Supported |
Sets/queries indexed palette RGB entries; |
|
|
Supported |
Emits |
|
|
Supported |
Attaches |
|
|
Supported |
|
|
|
Supported |
Sets/queries default foreground RGB (held across |
|
|
Supported |
Sets/queries default background RGB (held across |
|
|
Supported |
Sets/queries cursor RGB (held across |
|
|
Ignored |
Parsed and dispatched to |
|
|
Supported |
Emits |
|
|
Ignored |
Parsed and dispatched to |
|
|
Supported |
Reassembles chunked Kitty notifications into |
|
|
Supported |
Resets one or all palette entries to profile defaults; |
|
|
Supported |
Resets foreground RGB to profile default; |
|
|
Supported |
Resets background RGB to profile default; |
|
|
Supported |
Resets cursor RGB to profile default; |
|
|
Supported |
Tracks monotonic |
|
|
Supported |
Normalizes |
|
|
Supported |
Parses |
|
|
Ignored |
Parsed and dispatched to |
|
|
Ignored |
Parsed and dispatched to |
|
|
Divergent |
Tracks Rex program status tree and |
ANSI and DEC Modes¶
Mode |
Code |
Status |
Profile notes & test modules |
|---|---|---|---|
|
|
Supported |
Insert mode shifts cells right within active margins; |
|
|
Supported |
Automatic newline adds |
|
|
Supported |
Switches arrow keys between |
|
|
Divergent |
Gated by |
|
|
Supported |
Reverse video reflected in committed |
|
|
Supported |
Origin mode bounds |
|
|
Supported |
Auto-wrap mode (enabled by default); |
|
|
Supported |
Controls legacy |
|
|
Supported |
X10 press-only mouse tracking; |
|
|
Supported |
Cursor visibility flag on |
|
|
Divergent |
Enables |
|
|
Supported |
Allows |
|
|
Divergent |
Switches alternate screen without cursor save; |
|
|
Supported |
Selects |
|
|
Supported |
Switches legacy |
|
|
Divergent |
Left/right margin mode; disabled on |
|
|
Supported |
SIXEL display scrolling mode; |
|
|
Divergent |
Preserves screen contents on |
|
|
Supported |
VT200 button press/release tracking; |
|
|
Supported |
Drag motion tracking with |
|
|
Supported |
Any-motion mouse reporting; |
|
|
Supported |
Window focus-in/focus-out reporting; |
|
|
Divergent |
SGR mouse coordinates; |
|
|
Supported |
Maps wheel events to |
|
|
Divergent |
Pixel SGR coordinates; unrecognized when |
|
|
Divergent |
Clears alternate screen on switch; |
|
|
Divergent |
Saves/restores cursor; unrecognized when |
|
|
Divergent |
Saves cursor and switches alternate screen; |
|
|
Supported |
Wraps paste frames in |
|
|
Supported |
Holds |
|
|
Supported |
Unicode 17 grapheme clustering (enabled by default); |
|
|
Supported |
Emits |
|
|
Supported |
Emits |
Running Compiled libghostty-vt Parity¶
The default test suite runs chunk-boundary prefix determinism over all recorded
.jsonl corpus traces in tests/fixtures/ghostty_corpus/ without requiring a
native compiler. To run compiled libghostty-vt differential parity locally,
point LIBGHOSTTY_VT_PATH to a built libghostty-vt shared library:
$ LIBGHOSTTY_VT_PATH=/path/to/libghostty-vt.so uv run pytest -m ghostty -v
When LIBGHOSTTY_VT_PATH is unset, @pytest.mark.ghostty tests skip. When
LIBGHOSTTY_VT_PATH is set to a missing path, load_optional_ghostty_vt()
raises FileNotFoundError so configured parity jobs fail visibly.