Incomplete list of supported ESC-sequences
(notation: SR = scrolling region)
SO (0x0e) Switch to G1 charset (DEC)
SI (0x0f) Switch to G0 charset (DEC)
ESC sp F S7C1T send 7-bit controls (default)
ESC sp G S8C1T send 8-bit controls (partially supported)
ESC # 8 DECALN Fill the screen with letter 'E'
ESC # other_character DEC___ Do nothing
ESC 7 DECSC save cursor position (and some other data)
ESC 8 DECRC restore cursor position (and some other data)
ESC = DECKPAM keypad application mode (if enabled in 'Connect' dialog)
ESC > DECKPNM keypad numeric mode (default mode)
ESC ( A set G0 charset to the default (ANSI) charset
ESC ( 0 set G0 charset to the graphics charset (vt100 pseudo-graphics)
ESC ) A set G1 charset to the default (ANSI) charset
ESC ) 0 set G1 charset to the graphics charset (vt100 pseudo-graphics)
ESC D IND cursor down (at the bottom of SR: scroll up)
ESC E NEL cursor goes to the beginning of the next line (at the bottom of SR: scroll up)
ESC M RI cursor up (at the top of SR: scroll down)
ESC Z DECID the same as ESC [ c
ESC c RIS hard terminal reset
ESC [ @ ICH insert a space
ESC [ num @ ICH insert num space
ESC [ A CUU up 1 line (doesn't leave the scrolling region)
ESC [ num A CUU up num line (doesn't leave the scrolling region)
ESC [ B CUB down 1 line (doesn't leave the scrolling region)
ESC [ num B CUB down num line (doesn't leave the scrolling region)
ESC [ C CUF right 1 position (doesn't leave the current line)
ESC [ num C CUF right num position (doesn't leave the current line)
ESC [ D CUB left 1 position (doesn't leave the current line)
ESC [ num D CUB left num position (doesn't leave the current line)
ESC [ E CNL cursor goes to the first position of the next line (doesn't leave the scroll area)
ESC [ num E CNL cursor goes to the first position of the nth line (doesn't leave the scroll area)
ESC [ F CPL cursor goes to the first position of the previous line (doesn't leave the scroll area)
ESC [ num F CPL cursor goes to the first position of the nth previous line (doesn't leave the scroll area)
ESC [ G CHA cursor goes to the first position of the current line
ESC [ num G CHA cursor goes to the numth position of the current line (or to the last)
ESC [ row ; column H CUP cursor to row,column
ESC [ row H CUP cursor to row,1
ESC [ H CUP cursor to 1,1
ESC [ I CHT move 1 TAB-position forward
ESC [ num I CHT move num TAB-position forward
ESC [ J ED clear screen: from cursor to end
ESC [ 0 J ED clear screen: from cursor to end
ESC [ 1 J ED clear screen: from start to cursor
ESC [ 2 J ED clear screen: from start to end
ESC [ 3 J clear history (xterm extension)
ESC [ K EL clear in this line: from cursor to end
ESC [ 0 K EL clear in this line: from cursor to end
ESC [ 1 K EL clear in this line: from start to cursor
ESC [ 2 K EL clear in this line: from start to end
ESC [ L IL insert 1 line at the cursor position, scroll down (only in SR)
ESC [ num L IL insert num lines at the cursor position, scroll down (only in SR)
ESC [ M DL delete 1 line at the cursor position, scroll up (only in SR)
ESC [ num M DL delete num lines at the cursor position, scroll up (only in SR)
ESC [ S SU insert 1 empty line at the top of the scrolling region
ESC [ num S SU insert num empty lines at the top of the scrolling region
ESC [ T SD insert 1 empty line at the bottom of the scrolling region
ESC [ num T SD insert num empty lines at the bottom of the scrolling region
ESC [ ` HPA cursor goes to the first position of the current line
ESC [ num ` HPA cursor goes to the numth position of the current line (or to the last)
ESC [ a HPR cursor right 1 position (doesn't leave the current line)
ESC [ num a HPR cursor right num position (doesn't leave the current line)
ESC [ c DA1 send Primary Device Attributes. We send ESC[62;2c
ESC [ > c DA2 send Secondary Device Attributes. We send ESC[>1;95;0c
ESC [ = c DA3 send Tertiary Device Attributes. We send DCS ! | local-IP ST
ESC [ d VPA cursor to the first line (same column)
ESC [ num d VPA cursor to the numth line (same column)
ESC [ e VPR same as ESC [ B
ESC [ num e VPR same as ESC [ num B
ESC [ row ; column f HVP cursor to row,column
ESC [ row f HVP cursor to row,1
ESC [ f HVP cursor to 1,1
ESC [ numlist h - set mode(s)
ESC [ numlist l - reset mode(s)
numlist (one or more elements (semicolon-separated)):
4 - IRM display characters: insert (set) / owerwrite (reset)
20 - LNMIRM 'Return' sends CRLF (set) / CR (reset)
ESC [ ? numlist h - set private mode(s)
ESC [ ? numlist l - reset private mode(s)
numlist (one or more elements (semicolon-separated)):
1 - DECCKM keyboard application mode (set) / ANSI mode (reset)
2 - DECANM keyboard VT52 mode -- ignored
3 - DECCOLM switch to 24x132 mode (set) / switch to 24x80 mode (reset)
4 - DECSCLM scrolling mode -- not implemented
5 - DECSCNM inverse video (affects the whole screen, not equal to ESC [ 7 m)
6 - DECOM if set, the cursor cannot leave the scrolling region
7 - DECAWM auto wrap: if set, when line is full: next line (or scroll)
8 - DECARM auto repeat enabled
9 - mouse reporting (oldest/simplest version, X10 compatible)
10 - select G0 charset -- linux-specific
11 - select G1 charset -- linux-specific
25 - DECTCEM cursor visible (set) / invisible
47 - alternate screen (set) / normal screen (reset)
66 - DECNKM keypad application mode (set) / numeric mode (reset)
67 - DECBKM backspace key sends ^H (set) / ^? (reset) -- We don't do this
1000 - mouse reporting (newer version, X11 compatible)
1001 - mouse reporting (like 1000 with an extra function we don't do)
1002 - mouse reporting (like 1000 with an extra function)
1003 - mouse reporting (like 1002 with an extra function we don't do)
1047 - set: switch to alternate screen
reset: if on the alternate screen, clear it; switch to normal screen
1048 - set: save cursor; reset: restore cursor
1049 - set: save cursor, switch to alternate screen, clear screen
reset: switch to normal screen, restore cursor
ESC [ m - clear/reset attributes/colors
ESC [ numlist m - set attributes/colors
numlist (one or more elements (semicolon-separated)):
0 - clear/reset attributes/colors
1 - bold on (dtelnet: change foreground colors (for some colors))
4 - underline on
5 - blink on (dtelnet: change background colors (for some colors))
7 - inverse on (switch background and foreground colors)
10 - select charset #0
11 - select charset #1
12 - select charset #2 -- ignored
21 - bold off (dtelnet: don't change foreground colors)
24 - underline off
25 - blink off (dtelnet: don't change background colors)
27 - inverse off
30..37 - set foreground color (-30 => 0..7 => dark-black..dark-white)
38;5;col - set foreground color (0..255)
39 - set default foreground color (cf /A command line option)
40..47 - set background color (-40 => 0..7 => dark-black..dark-white)
48;5;col - set background color (0..255)
49 - set default foreground color (cf /A command line option)
90..97 - set foreground color (-90+8 => 8..15 => light-black..light-white)
100..107 - set background color (-100+8 => 8..15 => light-black..light-white)
ESC [ 5 n DSR-OD: report status as ESC [ 0 n (meaning: status OK)
ESC [ 6 n DSR-CPR: report cursor position as ESC [ row ; column R
ESC [ ? 6 n DSR-XCPR: report cursor position as ESC [ ? row ; column ; 1 R
ESC [ ? 26 n DSR-KBD: report keyboard status/version
ESC [ top; bottom r DECSTBM set scrolling area (aka set top and bottom margins)
ESC [ s save cursor position (and some other data) (= ESC 7)
ESC [ u restore cursor position (and some other data) (= ESC 8)
ESC [ 4 ; pixel-rows ; pixel-columns t set window size (pixels)
ESC [ 8 ; character-rows ; character-columns t set window size (characters)
ESC [ 14 t get window size; reply: ESC [ 4 ; pixel-rows ; pixel-columns t
ESC [ 18 t get window size; reply: ESC [ 8 ; character-rows ; character-columns t
ESC [ x DECREQTPARM (request terminal parameters)
IND (0x84) same as ESC D
NEL (0x85) same as ESC E
SCI (0x9A) same as ESC Z
CSI (0x9B) same as ESC [ (starts a sequence)