Logo  

Home - Old Man Programmer

Displaying webapps/vt100/doc//vt

			DEC VT-100 Control Codes

	The following  is a  list of  the supported  VT-100 control codes
that are received or transmitted when Terminal Type is set to VT100:

#	<ESC> c		Reset
#	<ESC> 7		Store cursor location and attributes
#	<ESC> 8		Get cursor location and attributes
#	<ESC> D		Index (same as linefeed)
#	<ESC> E		New line (go to first column of next line)
#	<ESC> M		Reverse linefeed
	<ESC> Z		Identify (not recommended.. see ESC [c)
	<ESC> <		Sets terminal for ANSI escape sequences
	<ESC> >		Sets auxiliary keypad to numeric
	<ESC> =		Sets auxiliary keypad to escape sequences
#	<ESC> [xA	Move cursor up x lines
#	<ESC> [xB	Move cursor down x lines
#	<ESC> [xC	Move cursor right x lines
#	<ESC> [xD	Move cursor left x lines
#	<ESC> [r;cH	Move cursor to row r, column c
#	<ESC> [0J	Erase from cursor to end of screen
#	<ESC> [1J	Erase from cursor to start of screen
#	<ESC> [2J	Erase entire screen
#	<ESC> [0K	Erase from cursor to end of line
#	<ESC> [1K	Erase from cursor to start of line
#	<ESC> [2K	Erase entire line
	<ESC> [0c	Identify
	<ESC> [?1;0c	Response to Identify
#	<ESC> [r;cf	Move cursor to row r, column c
	<ESC> [>4h	Home and Clear on FF
	<ESC> [>14h	Half duplex
	<ESC> [>4l	LF on FF
	<ESC> [>14l	Full duplex
#	<ESC> [m	Default attributes (white on black, no attributes)
#	<ESC> [0m	Default attributes (white on black, no attributes)
#	<ESC> [4m	Turn underline attribute on
#	<ESC> [7m	Inverse letters
	<ESC> [5n	Device Status Report
	<ESC> [0n	Term OK (echoed back for DSR)
	<ESC> [6n	Cursor Position Report
	<ESC> [r;cR	Cursor is at row r, column c (echoed back for CPR)
#	<ESC> [t;br	Set top and bottom margins (for scroll)
	<ESC> [h;m;st	Set time to h:m:s
	<ESC> [0v	Visible cursor
	<ESC> [1v	Invisible cursor
	<ESC> [2v	Cursor is underline
	<ESC> [3v	Cursor is block

	<ESC> [?1h	Cursor keys generate control (application) functions
	<ESC> [?1l	Cursor keys generate ANSI cursor control sequences

	<ESC>
	<ESC> [?2l	Use VT-52 escape sequences
	
	<ESC> [?3h	132 column mode
	<ESC> [?3l	80 column mode (default)

	<ESC> [?4h	Smooth scrolling
	<ESC> [?4l	Jump scrolling (default)

	<ESC> [?5h	Reverse screen (white bg/black fg)
	<ESC> [?5l	Normal screen (black on white)

	<ESC> [?6h	Set home position (line #'s relative to scroll region)
			cursor cannot move outside of scrolling region.
	<ESC> [?6l	Reset home position (back to 1,1)

	<ESC> [?7h	Auto-wrap mode
	<ESC> [?7l	Auto-wrap off

	<ESC> [?8h	Auto repeat mode
	<ESC> [?8l	Keys do not auto-repeat

<esc> [L	Insert line(s)
Delete Character (DCH)

ESC  [  Pn   P
033 133 *** 120

Deletes Pn characters, starting with the character at cursor position. When a character is deleted, all characters to the right of cursor move left. This creates a space character at right margin. This character has same character attribute as the last character moved left.

Insert Line (IL)

ESC  [  Pn   L
033 133 *** 114

Inserts Pn lines at line with cursor. Lines displayed below cursor move down. Lines moved past the bottom margin are lost. This sequence is ignored when cursor is outside scrolling region.

Delete Line (DL)

ESC  [  Pn   M
033 133 *** 115

Deletes Pn lines, starting at line with cursor. As lines are deleted, lines displayed below cursor move up. Lines added to bottom of screen have spaces with same character attributes as last line moved up. This sequence is ignored when cursor is outside scrolling region.

<esc> [?12l	Stop Blinking Cursor (att610)
<esc> [?25h	Show Cursor (DECTCEM)
<esc> [?1000l	Don’t Send Mouse X & Y on button press and release. See the section Mouse Tracking.
<esc> [?1002h	Use Cell Motion Mouse Tracking.
<esc> [?25l	Hide Cursor (DECTCEM)
<esc> [?1002l	Don’t Use Cell Motion Mouse Tracking
<esc> [?1l	Normal Cursor Keys (DECCKM)
<esc> [?1049l	Use Normal Screen Buffer and restore cursor as in DECRC (unless disabled by the titeInhibit resource). This combines the effects of the 1 0 4 7 and 1 0 4 8 modes. Use this with terminfo-based applications rather than the 4 7 mode.

	
	
	DEC VT-100 FUNCTION   TRANSMITTED CODES (hex)
	---------------------------------------------
	Horizontal Tab ........................... 09
	Character Delete ......................... 7F
	Home Cursor .......................... 1B5B48
	Cursor Up ............................ 1B5B41
	Cursor Down .......................... 1B5B42
	Cursor Right ......................... 1B5B43
	Cursor Left .......................... 1B5B44
	Clear Screen ................. 1B5B481B5B324A
	Erase end of line .................... 1B5B4B

	Keypad Application mode 0 ............ 1B4F70 ^[Op
	Keypad Application mode 1 ............ 1B4F71 ^[Oq
	Keypad Application mode 2 ............ 1B4F72 ^[Or
	Keypad Application mode 3 ............ 1B4F73 ^[Os
	Keypad Application mode 4 ............ 1B4F74 ^[Ot
	Keypad Application mode 5 ............ 1B4F75 ^[Ou
	Keypad Application mode 6 ............ 1B4F76 ^[Ov
	Keypad Application mode 7 ............ 1B4F77 ^[Ow
	Keypad Application mode 8 ............ 1B4F78 ^[Ox
	Keypad Application mode 9 ............ 1B4F79 ^[Oy

	Keypad Application mode - (dash) ..... 1B4F6D ^[Om
	Keypad Application mode , (comma) .... 1B4F6C ^[Ol
	Keypad Application mode . (period) ... 1B4F6E ^[On
	Keypad Application mode ENTER ........ 1B4F4D ^[OM

	Program Function 1 (PF1) ............. 1B4F50 ^[OP
	Program Function 2 (PF2) ............. 1B4F51 ^[OQ
	Program Function 3 (PF3) ............. 1B4F52 ^[OR
	Program Function 4 (PF4) ............. 1B4F52 ^[OS