2
===============================================================================
3
Wherever you see '#', that should be replaced by the appropriate number.
5
ESC code sequence Function
6
------------------- ---------------------------
8
ESC[#;#H or ESC[#;#f Moves cusor to line #, column #
9
ESC[#A Moves cursor up # lines
10
ESC[#B Moves cursor down # lines
11
ESC[#C Moves cursor forward # spaces
12
ESC[#D Moves cursor back # spaces
13
ESC[#;#R Reports current cursor line & column
14
ESC[s Saves cursor position for recall later
15
ESC[u Return to saved cursor position
18
ESC[2J Clear screen and home cursor
19
ESC[K Clear to end of line
21
Set Graphics Rendition:
22
ESC[#;#;....;#m Set display attributes where # is
25
4 underline (mono only)
28
8 nondisplayed (invisible)
46
ESC[=#;7h or Put screen in indicated mode where # is
47
ESC[=h or 0 for 40 x 25 black & white
48
ESC[=0h or 1 for 40 x 25 color
49
ESC[?7h 2 for 80 x 25 b&w
51
4 for 320 x 200 color graphics
52
5 for 320 x 200 b & w graphics
53
6 for 640 x 200 b & w graphics
54
7 to wrap at end of line
56
ESC[=#;7l or ESC[=l or Resets mode # set with above command
59
Keyboard Reassignments:
60
ESC[#;#;...p Keyboard reassignment. The first ASCII
61
or ESC["string"p code defines which code is to be
62
or ESC[#;"string";#; changed. The remaining codes define
63
#;"string";#p what it is to be changed to.
65
E.g. Reassign the Q and q keys to the A and a keys (and vice versa).
66
ESC [65;81p A becomes Q
67
ESC [97;113p a becomes q
68
ESC [81;65p Q becomes A
69
ESC [113;97p q becomes a
71
E.g. Reassign the F10 key to a DIR command.
72
ESC [0;68;"dir";13p The 0;68 is the extended ASCII code
73
for the F10 key and 13 is the ASCII
74
code for a carriage return.
76
Other function key codes F1=59,F2=60,F3=61,F4=62,F5=63
77
F6=64,F7=65,F8=66,F9=67,F10=68