g Reset and set modes
: Set Modes
c Esc  [ <c> ; ... ; <c> h
: Reset Modes
c   Esc  [ <c> ; ... ; <c> l
p 2 Lock keyboard (set); Unlock keyboard (reset)
p 4 Insert mode (set); Replace mode (reset)
p 12 Echo on (set); Echo off (reset)
p 20 Return = CR+LF (set); Return = CR (reset)
p ?1 Cursorkeys application (set); Cursorkeys normal (reset)
p ?2 Ansi (set); VT52 (reset)
p ?3 132 char/row (set); 80 char/row (reset)
p ?4 Jump scroll (set); Smooth scroll (reset)
p ?5 Reverse screen (set); Normal screen (reset)
p ?6 Sets relative coordinates (set); Sets absolute coordinates (reset)
p ?7 Auto wrap (set); Auto wrap off (reset)
p ?8 Auto repeat on (set); Auto repeat off (reset)
p ?18 Send FF to printer after print screen (set); No char after PS (reset)
p ?19 Print screen prints full screen (set); PS prints scroll region (reset)
p ?25 Cursor on (set); Cursor off (reset) 
 
: Set scrolling region (n1=upper,n2=lower)
c Esc  [ <n1> ; <n2> r
 
g Cursor movement (<n>=how many chars or lines), cursor stop at margin.
: Up
c Esc  [ <n> A
: Down
c Esc  [ <n> B
: Right
c Esc  [ <n> C
: Left
c Esc  [  n  D
: Cursor position  (<n1>=y,<n2>=x, from top of screen or scroll region)
c Esc  [ <n1> ; <n2> H
c Esc  [ <n1> ; <n2> f
: Index (cursor down with scroll up when at margin)
c Esc  D
: Reverse index (cursor up with scroll down when at margin)
c Esc  M
: Next line (CR+Index)
c Esc  E
: Save cursor and attribute
c Esc  7
: Restore cursor and attribute
c Esc  8
 
g Select character set
c Esc '()' 'AB012'
1 ( select G0
1 ) select G1
2 A UK
2 B US
2 0 Special characters and line drawing character set
2 1 Alternate ROM as G0
/ Not in vt100
2 2 Alternate ROM special characters character set
/ Not in vt100

: Selects G2 for one character
c Esc  N
/ Not in vt100
: Selects G3 for one character
c Esc  O
 
: Set graphic rendition
c Esc  [ <n> ; ... m
p 0 Turn off attributes
p 1 Bold (Full)
p 2 Half
/ Not in vt100
p 4 Underline
p 5 Blink
p 7 Reverse
p 21 Normal intensity
p 22 Normal intensity
p 24 Cancel underlined
p 25 Cancel blinking
p 27 Cancel reverse
 
g Tab stops
: Set horizontal tab
c Esc  H
: Clear horizontal tab
c Esc  [   g
c Esc  [   0   g
: Clear all horizontal tabs
c Esc  [   3   g
 
: Line attributes
c Esc # <3-6>
p 3 Double-height, Top half
p 4 Double-height, Bottom half
p 5 Single-width, single-height
p 5 Double-width
 
g Erasing
: Erase in line
c Esc <n> K
p 0 End of line (including cursor position)
p 1 Beginning of line (including cursor position)
p 2 Complete line
: Erase in display
c Esc <n> J
p 0 End of screen (including cursor position)
p 1 Beginning of screen (including cursor position)
p 2 Complete display
 
g Computer editing
: Delete characters (<n> characters right from cursor
c Esc  [ <n> P
: Insert line (<n> lines)
c Esc  [ <n> L
: Delete line (<n> lines)
c Esc  [ <n> M
 
: Printing
c Esc  [ <c> i
p 0 Prints screen (full or scroll region)
p 4 Printer controller off
p 5 Printer controller on (Print all received chars to printer)
p ?1 Print cursor line
p ?4 Auto print off
p ?5 Auto print on (Prints line to printer when you exit from it)
 
g Reports

: Device status
c Esc  [ <c> n
p 0 Response Ready, no malfunctions detected
p 3 Malfunction, error in self-test.
p 5 Status report request
p 6 Request cursor position.
p ?10 Response to printer status request, All ok.
p ?11 Response to printer status request, Printer is not ready.
p ?13 Response to printer status request, No printer.
p ?15 Status report request from printer
 
: Cursor position raport (Response to request cursor position)
c Esc  [ <n1> ; <n2> R

: Request terminal to identify itself (esc Z may not be supported in future)
c Esc  [   c
c Esc  [   0   c
c Esc  Z

: Response to terminal identify (VT102)
c Esc  [   ?   6   c
 
: Reset to initial state
c Esc  c
 
g Tests
: Invoke confidence test
c Esc  [   2   ; <n> y
p 1 Power-up test
p 2 Data loopback test
p 4 EIA loopback test
p 9 Power-up tests (continuously)
p 10 Data loopback tests (continuously)
p 12 EIA loopback tests (continuously)
p 16 Printer loopback test
p 24 Printer loopback tests (continuously)
 
 
: Screen adjustments
c Esc  #   8
 
 
: Keyboard indicator
c Esc  [   <n>   q
p 0  Led L1 off
p 1  Led L1 on
 
Control characters
  000 = Null (fill character)
  003 = ETX (Can be selected half-duplex turnaround char)
  004 = EOT (Can be turnaround or disconnect char, if turn, then DLE-EOT=disc.)
  005 = ENQ (Transmits answerback message)
  007 = BEL (Generates bell tone)
  010 = BS  (Moves cursor left)
  011 = HT  (Moves cursor to next tab)
  012 = LF  (Linefeed or New line operation)
  013 = VT  (Processed as LF)
  014 = FF  (Processed as LF, can be selected turnaround char)
  015 = CR  (Moves cursor to left margin, can be turnaround char)
  016 = SO  (Selects G1 charset)
  017 = SI  (Selects G0 charset)
  021 = DC1 (XON, causes terminal to continue transmit)
  023 = DC3 (XOFF, causes terminal to stop transmitting)
  030 = CAN (Cancels escape sequence)
  032 = SUB (Processed as CAN)
  033 = ESC (Processed as sequence indicator)
