Skip to content

VT sequences

List of VT sequences supported by Contour Terminal Emulator.

Control Codes

Sequence Code Description
\x04 EOT End of Transmission
\x07 BEL Bell
\x08 BS Backspace
\t TAB Tab
\n LF Line Feed
\x0b VT Vertical Tab
\x0c FF Form Feed
\r CR Carriage Return
\x0e LS1 Shift Out; Maps G1 into GL.
\x0f LS0 Shift In; Maps G0 into GL (the default).

Escape Sequences

Sequence Code Description
ESC ( 0 SCS_G0_SPECIAL Set G0 to DEC Special Character and Line Drawing Set
ESC ) 0 SCS_G1_SPECIAL Set G1 to DEC Special Character and Line Drawing Set
ESC 6 DECBI Back Index
ESC 7 DECSC Save Cursor
ESC 8 DECRS Restore Cursor
ESC # 8 DECALN Screen Alignment Pattern
ESC 9 DECFI Forward Index
ESC = DECKPAM Keypad Application Mode
ESC > DECKPNM Keypad Numeric Mode
ESC ( B SCS_G0_USASCII Set G0 to USASCII
ESC ) B SCS_G1_USASCII Set G1 to USASCII
ESC D IND Index
ESC E NEL Next Line
ESC H HTS Horizontal Tab Set
ESC M RI Reverse Index
ESC N SS2 Single Shift Select (G2 Character Set)
ESC O SS3 Single Shift Select (G3 Character Set)
ESC c RIS Reset to Initial State (Hard Reset)

Control Sequences

Sequence Code Description
CSI 0 6 DECXCPR Report cursor position
CSI 0..1 @ ICH Insert characters
CSI 0..1 A CUU Move cursor up
CSI 0..1 B CUD Move cursor down
CSI 0..1 C CUF Move cursor forward
CSI 0..1 D CUB Move cursor backward
CSI 0..1 E CNL Move cursor to next line
CSI 0..1 F CPL Move cursor to previous line
CSI 0..1 G CHA Move cursor to column
CSI 0..2 H CUP Move cursor to position
CSI 0..1 I CHT Cursor Horizontal Forward Tabulation
CSI 0.. J ED Erase in Display
CSI ? 0..1 J DECSED Selective Erase in Display
CSI 0..1 K EL Erase in Line
CSI ? 0..1 K DECSEL Selective Erase in Line
CSI 0..1 L IL Insert lines
CSI 0..1 M DL Delete lines
CSI > 0 M SETMARK Set Mark
CSI 0..1 P DCH Delete characters
CSI 0.. # P XTPUSHCOLORS Pushes the color palette onto the palette's saved-stack.
CSI 0.. # Q XTPOPCOLORS Pops the color palette from the palette's saved-stack.
CSI 0 # R XTREPORTCOLORS Reports number of color palettes on the stack.
CSI 0..1 S SU Scroll Up
CSI ? 2..4 S XTSMGRAPHICS Set/request graphics attribute
CSI 0..1 T SD Scroll Down
CSI 0..1 X ECH Erase characters
CSI 0..1 Z CBT Cursor Backward Tabulation
CSI 1 ``` HPA Horizontal Position Absolute
CSI 1 a HPR Horizontal Position Relative
CSI 1 b REP Repeat last character
CSI 0..1 c DA1 Primary Device Attributes
CSI = 0..1 c DA3 Tertiary Device Attributes
CSI > 0..1 c DA2 Secondary Device Attributes
CSI 0..1 d VPA Vertical Position Absolute
CSI 0..2 f HVP Horizontal and Vertical Position
CSI 0..1 g TBC Horizontal Tab Clear
CSI 1.. h SM Set Mode
CSI ? 1.. h DECSM Set DEC-mode
CSI 1.. l RM Reset Mode
CSI ? 1.. l DECRM Reset DEC-mode
CSI 0.. m SGR Select Graphic Rendition
CSI 1 n DSR Device Status Report (DEC)
CSI ? 1 n DSR Device Status Report (DEC)
CSI 0..1 p DECSSCLS Set Scroll Speed.
CSI 0 ! p DECSTR Soft terminal reset
CSI 2 " p DECSCL Set conformance level (DECSCL), VT220 and up.
CSI 1 $ p DECRQM_ANSI Request ANSI-mode
CSI ? 1 $ p DECRQM Request DEC-mode
CSI 0..1 q DECSCUSR Set Cursor Style
CSI 0..1 " q DECSCA Select Character Protection Attribute
CSI > 0..1 q XTVERSION Report xterm version
CSI 0..2 r DECSTBM Set top/bottom margin
CSI 5.. $ r DECCARA Change Attributes in Rectangular Area
CSI ? 0.. r XTRESTORE Restore DEC private modes.
CSI 0 s SCOSC Save Cursor (available only when DECLRMM is disabled)
CSI 0..2 s DECSLRM Set left/right margin
CSI > 0..1 s XTSHIFTESCAPE Set/reset shift-escape options
CSI ? 0.. s XTSAVE Save DEC private modes.
CSI 1..3 t WINMANIP Window Manipulation
CSI > 0..2 t XTCAPTURE Report screen buffer capture.
CSI 0 u ANSISYSSC Save Cursor (ANSI.SYS)
CSI < 0..1 u CSIULEAVE Leave Extended keyboard mode
CSI = 1..2 u CSIUENHCE Request enhancement to extended keyboard mode
CSI > 0..1 u CSIUENTER Enter Extended keyboard mode
CSI ? 0 u CSIUQUERY Query Extended keyboard mode
CSI 0..8 $ v DECCRA Copy rectangular area
CSI 1 $ w DECRQPSR Request presentation state report
CSI 0..5 $ x DECFRA Fill rectangular area
CSI 0..4 $ z DECERA Erase rectangular area
CSI 0 # { SGRSAVE Saves video attributes onto stack.
CSI 0..4 $ { DECSERA Selective Erase in Rectangular Area
CSI 0..1 $ | DECSCPP Select 80 or 132 Columns per Page
CSI 0..1 * | DECSNLS Select number of lines per screen.
CSI 0 # } SGRRESTORE Restores video attributes.
CSI 0..1 $ } DECSASD Select Active Status Display
CSI 0..1 ' } DECIC Insert column
CSI 0..1 $ ~ DECSSDT Select Status Display (Line) Type
CSI 0..1 ' ~ DECDC Delete column
CSI 3..18 , ~ DECPS Controls the sound frequency or notes

Operating System Commands

Sequence Code Description
OSC 0 SETTITLE Change Window & Icon Title
OSC 1 SETICON Change Icon Title
OSC 2 SETWINTITLE Change Window Title
OSC 3 SETXPROP Set X11 property
OSC 4 SETCOLPAL Set/Query color palette
OSC 7 SETCWD Set current working directory
OSC 8 HYPERLINK Hyperlinked Text
OSC 10 COLORFG Change or request text foreground color.
OSC 11 COLORBG Change or request text background color.
OSC 12 COLORCURSOR Change text cursor color to Pt.
OSC 13 COLORMOUSEFG Change mouse foreground color.
OSC 14 COLORMOUSEBG Change mouse background color.
OSC 50 SETFONT Get or set font.
OSC 52 CLIPBOARD Clipboard management.
OSC 60 SETFONTALL Get or set all font faces, styles, size.
OSC 104 RCOLPAL Reset color full palette or entry
OSC 106 COLORSPECIAL Enable/disable Special Color Number c.
OSC 110 RCOLORFG Reset VT100 text foreground color.
OSC 111 RCOLORBG Reset VT100 text background color.
OSC 112 RCOLORCURSOR Reset text cursor color.
OSC 113 RCOLORMOUSEFG Reset mouse foreground color.
OSC 114 RCOLORMOUSEBG Reset mouse background color.
OSC 117 RCOLORHIGHLIGHTBG Reset highlight background color.
OSC 119 RCOLORHIGHLIGHTFG Reset highlight foreground color.
OSC 777 NOTIFY Send Notification.
OSC 888 DUMPSTATE Dumps internal state to debug stream.

Device Control Sequences

Sequence Code Description
DCS 0 $ p STP Set Terminal Profile
DCS 0..3 q DECSIXEL Sixel Graphics Image
DCS 0 $ q DECRQSS Request Status String
DCS 0 + q XTGETTCAP Request Termcap/Terminfo String