Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / pcvt / Misc / Doc / EscapeSequences
1              Control Codes and Escape Sequences supported by pcvt
2 ===============================================================================
3
4 CONTROL CODES
5 -------------------------------------------------------------------------------
6
7         NUL (0x00)      ignored
8         SOH (0x01)      ignored
9         STX (0x02)      ignored
10         ETX (0x03)      ignored
11         EOT (0x04)      ignored
12         ENQ (0x05)      ignored
13         ACK (0x06)      ignored
14
15         BEL (0x07)      beep
16
17         BS  (0x08)      move one character position to the left
18                         until at left margin
19
20         HT  (0x09)      move to next tab stop
21
22         LF  (0x0a)      move to next line, same column
23         VT  (0x0b)      move to next line, same column
24         FF  (0x0c)      move to next line, same column
25         
26         CR  (0x0d)      move to left margin on current column
27         
28         SO  (0x0e)      invoke character set G1 into GL
29         SI  (0x0f)      invoke character set G0 into GL
30
31         DLE (0x10)      ignored
32         DC1 (0x11)      ignored
33         DC2 (0x12)      ignored
34         DC3 (0x13)      ignored
35         DC4 (0x14)      ignored
36         NAK (0x15)      ignored
37         SYN (0x16)      ignored
38         ETB (0x17)      ignored
39
40         CAN (0x18)      abort current escape sequence
41
42         EM  (0x19)      ignored
43
44         SUB (0x1a)      abort current escape sequence
45         
46         ESC (0x1b)      start of escape sequence
47
48         FS  (0x1c)      ignored
49         GS  (0x1d)      ignored
50         RS  (0x1e)      ignored
51         US  (0x1f)      ignored
52
53         VT220 control codes in the range 0x80 .. 0x9f are completely ignored,
54         but displayed as C1 display controls.
55
56
57 ESCAPE SEQUENCES                                              DIGITAL EQUIPMENT
58 -------------------------------------------------------------------------------
59
60 (ni) = not implemented yet, all hooks available inside emulator!
61 <p>  = numeric parameter
62
63         ESC space F     select 7-bit c1 control transmission (ni)
64         ESC space G     select 8-bit c1 control transmission (ni)
65
66         ESC # 3         double height top half          (ni)
67         ESC # 4         double height bottom half       (ni)
68         ESC # 5         single width single height      (ni)
69         ESC # 6         double width single height      (ni)
70
71         ESC # 8         fill screen with 'E's
72
73         ESC 7           save cursor
74
75         ESC 8           restore cursor
76
77         ESC =           keypad application mode
78
79         ESC >           keypad numeric mode
80
81         ESC D           index
82
83         ESC E           next line
84
85         ESC H           set tab at cur col
86
87         ESC M           reverse index
88
89         ESC N           single shift G2
90
91         ESC O           single shift G3
92
93         ESC Z           who are you
94
95         ESC d           Only available if PCVT_SETCOLOR was defined when
96                         compiling the kernel, allows to set custom color table
97                         for more info, see pcvt_out.c ...
98
99         ESC c           power up reset
100
101         ESC n           Lock Shift G2 -> GL
102
103         ESC o           Lock Shift G3 -> GL
104
105         ESC }           Lock Shift G2 -> GR
106
107         ESC |           Lock Shift G3 -> GR
108
109         ESC ~           Lock Shift G1 -> GR
110
111         ESC [ ? <p> h   set dec private modes   
112         ESC [ ? <p> l   reset dec private modes         
113                  1      CKM - cursor key mode
114                  6      OM - origin mode
115                  7      AWM - auto wrap mode
116
117         ESC [ <p> ' z   DECELR - Enable Locator Report                  (ni)
118
119         ESC [ <p> ' {   DECSLE - Select type of locator events          (ni)
120
121         ESC [ ? n       Terminal Reports
122
123         ESC [ ? K       selective erase in line
124
125         ESC [ ? J       selective erase in display
126
127         ESC [ <p> @     insert char(s)
128
129         ESC [ <p> A     cursor up
130
131         ESC [ <p> B     cursor down
132
133         ESC [ <p> C     cursor forward
134
135         ESC [ <p> D     cursor backward
136
137         ESC [ <p> H     cursor direct cursor addressing
138
139         ESC [ <p> J     erase screen
140
141         ESC [ <p> K     erase line
142
143         ESC [ <p> L     insert line
144
145         ESC [ <p> M     delete line
146
147         ESC [ <p> P     delete char
148
149         ESC [ <p> S     scroll up
150
151         ESC [ <p> T     scroll down
152
153         ESC [ <p> X     erase character
154
155         ESC [ <p> c     device attributes
156
157         ESC [ <p> f     direct cursor addressing
158
159         ESC [ <p> g     clear tabs
160
161         ESC [ <p> h     set mode
162         ESC [ <p> l     reset mode
163                4        IRM - insert replacement mode
164               20        LNM - line feed / newline mode
165
166         ESC [ <p> i     media copy (ni)
167
168         ESC [ <p> m     select graphic rendition
169                0        reset to normal attributes
170                1        bold
171                4        underline
172                5        blinking
173                7        reverse
174                22       bold off
175                24       underline off
176                25       blinking off
177                27       reverse off
178                30-37    foreground colors       (on color display)
179                40-47    background colors       (on color display)
180
181         ESC [ <p> n     device status report
182
183         ESC [ <p> r     set scrolling region
184
185         ESC [ <p> x     request / report terminal parameters
186
187         ESC [ <p> y     invoke selftests (ni)
188
189
190         ESC [ x         request/report parameters
191         ESC [ y         invoke seftest(s)
192
193         ESC [ " q       SCA
194         ESC [ ! p       SCA
195
196         ESC ( <p>       designate G0
197         ESC ) <p>       designate G1
198         ESC * <p>       designate G2
199         ESC + <p>       designate G3
200         ESC - <p>       designate G1 (96)
201         ESC . <p>       designate G2 (96)
202         ESC / <p>       designate G3 (96)
203                A        British or ISO-Latin-1
204                B        USASCII
205                C        Finnish
206                5        Finnish
207                E        Norwegian/Danish
208                6        Norwegian/Danish
209                H        Swedish
210                7        Swedish
211                K        German
212                Q        French Canadien
213                R        French
214                Y        Italian
215                Z        Spanish
216                0        special graphics
217                1        alternate ROM
218                2        alt ROM, spec graphics
219                3        HP Roman 8, upper 128 chars*/
220                4        Dutch
221                <        DEC Supplemental
222                =        Swiss
223                >        DEC Technical
224
225
226 ESCAPE SEQUENCES                                                HEWLETT-PACKARD
227 -------------------------------------------------------------------------------
228
229 ESC&f<attr>a<key>k<llen>d<slen>L<label><string>         set function key label
230
231         attr = attribute,       0 - normal              (not implemented)
232                                 1 - local only          (not implemented)
233                                 2 - transmit only       (not implemented)
234
235         key = function key number, range 1 .. 8
236
237         llen = label string length
238
239         slen = string string length
240
241         label = label data (up to 16 chars per label)
242
243         string = string to send data (up to 80 chars per label)
244                                                         (not implemented)
245
246 EXAMPLE:
247 ========
248         
249         ESC&f0a1k16d1LFUNCTION  KEY   0
250
251         sets function key label 1 to "FUNCTION  KEY   ".
252         should program fkey 1 to emit "0" on keypress
253
254
255 ESC&j<parm>     function key operations
256
257         parm = '@'      remove the function key labels from screen
258
259         parm = 'A'      display the modes set of function key labels
260
261         parm = 'B'      enable & display user function key labels
262
263         parm = 'C'      clear message & restore the current key labels
264
265         parm = 'R'      enable usr/sys and menu and label modes
266
267         parm = 'S'      disable usr/sys and menu and label modes
268