VT Sequence Reference

A reference of all VT sequences supported by Ghostty.

This page lists many of the VT sequences that Ghostty supports.

This page is a work-in-progress. Ghostty supports many more sequences than are listed here and for the sequences listed here the quality of the linked documentation varies. This is a very contributor friendly area to help improve the documentation!

They are currently grouped by sequence type (control, esc, CSI, etc.) and the listed alphabetically by syntax. In the future, we will introduce better organization and search capabilities.

NameSyntaxDescription
BEL0x07Alert the user (beep)
BS0x08Move cursor backward one position
TAB0x09Move cursor right to the next tab stop
LF0x0AMove cursor down one line, scrolling if necessary
CR0x0DMove cursor to the left margin
DECSCESC 7Save cursor
DECRCESC 8Restore cursor
INDESC DMove cursor down, scrolling if necessary
RIESC MMove cursor up, scrolling if necessary
RISESC cFull reset
DECSCUSRESC Pn " " qSet cursor style
DECKPAMESC =Set numeric keypad to application mode
DECKPNMESC >Set numeric keypad to numeric mode
DECALNESC # 8Screen alignment test
CUUCSI Pn AMove cursor up
CUDCSI Pn BMove cursor down
CUFCSI Pn CMove cursor right
CUBCSI Pn DMove cursor left
CNLCSI Pn EMove cursor down n lines and to the leftmost column
CPLCSI Pn FMove cursor up n lines and to the leftmost column
CUPCSI Py ; Px HMove cursor to the specified row and column
CHTCSI Pn IMove cursor right n tabs
EDCSI Pn JErase display
ELCSI Pn KErase line
DLCSI Pn MDelete n lines at the cursor
ILCSI Pn LInsert n lines at the cursor
DCHCSI Pn PDelete n characters at the cursor
SUCSI Pn SScroll up n lines
SDCSI Pn TScroll down n lines
ECHCSI Pn XErase n characters at the cursor
CBTCSI Pn ZMove cursor left n tabs
HPRCSI Pn aMove cursor to a column relative to the cursor
REPCSI Pn bRepeat the preceding character n times
VPACSI Py dMove cursor to the specified row
VPRCSI Pn eMove cursor down n rows relative to the cursor
TBCCSI Pn gClear one or all tab stops
DSRCSI Pn nDevice status report
DECSTBMCSI Pt ; Pb rSet top and bottom margins
DECSLRMCSI Pl ; Pr sSet left and right margins
ICHCSI Pn @Insert n characters at the cursor
HPACSI Px `Move cursor to the specified column
XTSHIFTESCAPECSI > Pn sConfigure shift modifier behavior with mouse reports