Skip to content

VT Compatibility

Attyx implements a comprehensive set of VT/ANSI escape sequences.

SequenceDescription
CSI H / CSI fAbsolute cursor position
CSI A/B/C/DRelative cursor movement (up/down/right/left)
CSI ECursor next line
CSI FCursor previous line
CSI GCursor column absolute
CSI dCursor row absolute
ESC 7 / CSI sSave cursor position
ESC 8 / CSI uRestore cursor position
SequenceDescription
CSI JErase display (to end, to start, or all)
CSI KErase line (to end, to start, or all)
CSI XErase characters
SequenceDescription
CSI rSet scroll region (DECSTBM)
CSI SScroll up
CSI TScroll down
ESC DIndex (move down, scroll within region)
ESC MReverse index (move up, scroll within region)
SequenceDescription
CSI LInsert lines
CSI MDelete lines
CSI @Insert characters
CSI PDelete characters
CodeDescription
0Reset all attributes
1Bold
2Dim
3Italic
4Underline
7Reverse video
9Strikethrough
30–37, 90–97Foreground colors (standard + bright)
40–47, 100–107Background colors (standard + bright)
38;5;N256-color foreground
48;5;N256-color background
38;2;R;G;B24-bit truecolor foreground
48;2;R;G;B24-bit truecolor background
SequenceDescription
ESC[?1h/lDECCKM — application/normal cursor keys
ESC[?7h/lAuto-wrap mode
ESC[?25h/lCursor visibility
ESC[?47h/lAlternate screen buffer (47)
ESC[?1000h/lMouse tracking (X10)
ESC[?1002h/lMouse tracking (button-event)
ESC[?1003h/lMouse tracking (any-event)
ESC[?1006h/lSGR mouse encoding
ESC[?1047h/lAlternate screen buffer (1047)
ESC[?1049h/lAlternate screen buffer (1049)
ESC[?2004h/lBracketed paste mode
ESC[?2026h/lSynchronized output
SequenceDescription
OSC 0/2Set terminal title
OSC 4Query palette color
OSC 7Set working directory
OSC 8Hyperlinks (clickable URLs)
OSC 9Desktop notification (iTerm2 style)
OSC 10Query/set foreground color
OSC 11Query/set background color
OSC 12Query/set cursor color
OSC 777Desktop notification (rxvt/Kitty style)
SequenceDescription
DCS … STDCS passthrough
SequenceDescription
CSI > N uPush keyboard flags
CSI < N uPop keyboard flags
CSI ? uQuery keyboard flags
APC GGraphics protocol (images)
SequenceDescription
CSI 5 nDevice status report
CSI 6 nCursor position report
CSI cPrimary device attributes (DA1)
CSI > cSecondary device attributes (DA2)
CSI Ps SP qSet cursor shape (DECSCUSR)
CSI ?Ps$pQuery DEC private mode (DECRQM)