Imported Upstream version 2.4.3
[platform/upstream/audit.git] / auparse / tty_named_keys.h
1 /* tty_named_keys.h --
2  * Copyright 2008 Red Hat Inc., Durham, North Carolina.
3  * All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  *
19  * Authors:
20  *      Miloslav Trmač <mitr@redhat.com>
21  */
22
23 /* Longest sequences should go first, but these are comparatively common. */
24 E("\x01", "^A")
25 E("\x02", "^B")
26 E("\x03", "^C") // Or "cancel" (3 terms)
27 E("\x04", "^D")
28 E("\x05", "^E")
29 E("\x06", "^F")
30 E("\x07", "^G")
31 E("\x08", "backspace")
32 E("\t", "tab")
33 E("\n", "nl")
34 E("\x0B", "^K")
35 E("\x0C", "^L")
36 E("\r", "ret")
37 E("\x0E", "^N")
38 E("\x0F", "^O")
39 E("\x10", "^P")
40 E("\x11", "^Q")
41 E("\x12", "^R")
42 E("\x13", "^S")
43 E("\x14", "^T")
44 E("\x15", "^U")
45 E("\x16", "^V")
46 E("\x17", "^W")
47 E("\x18", "^X")
48 E("\x19", "^Y")
49 E("\x1A", "^Z") // Or "suspend" (9 terms)
50 /* \x1B handled only after all other escape sequences */
51 E("\x7F", "backspace") // 59 terms; alternative: "delete" (11 terms)
52
53 // Based on terminal descriptions in ncrses-base-5.6-20.20080927.fc10.
54 // Conflicts are marked by comments.  Ordering: longest sequences first, then
55 // lexicographically.
56 E("\x1B[11;2~", "F13")
57 E("\x1B[11;3~", "F49")
58 E("\x1B[11;4~", "F61")
59 E("\x1B[11;5~", "F25")
60 E("\x1B[11;6~", "F37")
61 E("\x1B[12;2~", "F14")
62 E("\x1B[12;3~", "F50")
63 E("\x1B[12;4~", "F62")
64 E("\x1B[12;5~", "F26")
65 E("\x1B[12;6~", "F38")
66 E("\x1B[13;2~", "F15")
67 E("\x1B[13;3~", "F51")
68 E("\x1B[13;4~", "F63")
69 E("\x1B[13;5~", "F27")
70 E("\x1B[13;6~", "F39")
71 E("\x1B[14;2~", "F16")
72 E("\x1B[14;3~", "F52")
73 E("\x1B[14;5~", "F28")
74 E("\x1B[14;6~", "F40")
75 E("\x1B[15;2~", "F17")
76 E("\x1B[15;3~", "F53")
77 E("\x1B[15;5~", "F29")
78 E("\x1B[15;6~", "F41")
79 E("\x1B[17;2~", "F18")
80 E("\x1B[17;3~", "F54")
81 E("\x1B[17;5~", "F30")
82 E("\x1B[17;6~", "F42")
83 E("\x1B[18;2~", "F19")
84 E("\x1B[18;3~", "F55")
85 E("\x1B[18;5~", "F31")
86 E("\x1B[18;6~", "F43")
87 E("\x1B[19;2~", "F20")
88 E("\x1B[19;3~", "F56")
89 E("\x1B[19;5~", "F32")
90 E("\x1B[19;6~", "F44")
91 E("\x1B[20;2~", "F21")
92 E("\x1B[20;3~", "F57")
93 E("\x1B[20;5~", "F33")
94 E("\x1B[20;6~", "F45")
95 E("\x1B[21;2~", "F22")
96 E("\x1B[21;3~", "F58")
97 E("\x1B[21;5~", "F34")
98 E("\x1B[21;6~", "F46")
99 E("\x1B[23;2~", "F23")
100 E("\x1B[23;3~", "F59")
101 E("\x1B[23;5~", "F35")
102 E("\x1B[23;6~", "F47")
103 E("\x1B[24;2~", "F24")
104 E("\x1B[24;3~", "F60")
105 E("\x1B[24;5~", "F36")
106 E("\x1B[24;6~", "F48")
107 E("\x1B""O1;2A", "scroll-backward")
108 E("\x1B""O1;2B", "scroll-forward")
109 E("\x1B""O1;2C", "shift-right")
110 E("\x1B""O1;2D", "shift-left")
111 E("\x1B[192z", "F11")
112 E("\x1B[193z", "resume") // 3 terms; alternative "F12" (1 term)
113 E("\x1B[194z", "options") // 3 terms; alternative "F13" (1 term)
114 E("\x1B[195z", "undo") // 4 terms; alternative "F14" (1 term)
115 E("\x1B[196z", "help") // 1 term; alternative "F15" (1 term)
116 E("\x1B[197z", "copy")
117 E("\x1B[198z", "F17")
118 E("\x1B[199z", "F18")
119 E("\x1B[1;2A", "scroll-backward")
120 E("\x1B[1;2B", "scroll-forward")
121 E("\x1B[1;2C", "shift-right")
122 E("\x1B[1;2D", "shift-left")
123 E("\x1B[1;2F", "shift-end")
124 E("\x1B[1;2H", "shift-home")
125 E("\x1B[200z", "find") // 1 term; alternative "F19" (1 term)
126 E("\x1B[201z", "F20")
127 E("\x1B[208z", "F31")
128 E("\x1B[209z", "F32")
129 E("\x1B[210z", "F33")
130 E("\x1B[211z", "F34")
131 E("\x1B[212z", "F35")
132 E("\x1B[213z", "F36")
133 E("\x1B[214z", "home")
134 E("\x1B[215z", "F38")
135 E("\x1B[216z", "page-up")
136 E("\x1B[217z", "F40")
137 E("\x1B[218z", "B2")
138 E("\x1B[219z", "F42")
139 E("\x1B[220z", "end")
140 E("\x1B[221z", "F44")
141 E("\x1B[222z", "page-down") // 4 terms; alternative "F45" (1 term)
142 E("\x1B[224z", "F1")
143 E("\x1B[225z", "F2")
144 E("\x1B[226z", "F3")
145 E("\x1B[227z", "F4")
146 E("\x1B[228z", "F5")
147 E("\x1B[229z", "F6")
148 E("\x1B[230z", "F7")
149 E("\x1B[231z", "F8")
150 E("\x1B[232z", "F9")
151 E("\x1B[233z", "F10")
152 E("\x1B[234z", "F11") // 3 terms; alternative "F46" (1 term)
153 E("\x1B[235z", "F12") // 3 terms; alternative "F47" (1 term)
154 E("\x1B[2;2~", "shift-insert")
155 E("\x1B[2;5~", "shift-insert")
156 E("\x1B[3;2~", "shift-del")
157 E("\x1B[3;5~", "shift-del")
158 E("\x1B[5;2~", "shift-previous")
159 E("\x1B[5;5~", "shift-previous")
160 E("\x1B[6;2~", "shift-next")
161 E("\x1B[6;5~", "shift-next")
162 E("\x1B[11^", "F23")
163 E("\x1B[11~", "F1")
164 E("\x1B[12^", "F24")
165 E("\x1B[12~", "F2")
166 E("\x1B[13^", "F25")
167 E("\x1B[13~", "F3")
168 E("\x1B[14^", "F26")
169 E("\x1B[14~", "F4")
170 E("\x1B[15^", "F27")
171 E("\x1B[15~", "F5")
172 E("\x1B[17^", "F28")
173 E("\x1B[17~", "F6")
174 E("\x1B[18^", "F29")
175 E("\x1B[18~", "F7")
176 E("\x1B[19^", "F30")
177 E("\x1B[19~", "F8")
178 E("\x1B[20^", "F31")
179 E("\x1B[20~", "F9")
180 E("\x1B[21^", "F32")
181 E("\x1B[21~", "F10") // 85 terms; alternative "F0" (9 terms)
182 E("\x1B[23$", "F21")
183 E("\x1B[23@", "F43")
184 E("\x1B[23^", "F33")
185 E("\x1B[23~", "F11")
186 E("\x1B[24$", "F22")
187 E("\x1B[24@", "F44")
188 E("\x1B[24^", "F34")
189 E("\x1B[24~", "F12")
190 E("\x1B[25^", "F35")
191 E("\x1B[25~", "F13")
192 E("\x1B[26^", "F36")
193 E("\x1B[26~", "F14")
194 E("\x1B[28^", "F37")
195 E("\x1B[28~", "F15") // 42 terms; alternative "help" (8 terms)
196 E("\x1B[29^", "F38")
197 E("\x1B[29~", "F16") // 42 terms; alternative "redo" (4 terms)
198 E("\x1B[30~", "insert-line")
199 E("\x1B[31^", "F39")
200 E("\x1B[31~", "F17") // 46 terms; alternative "delete-line" (1 term)
201 E("\x1B[32^", "F40")
202 E("\x1B[32~", "F18")
203 E("\x1B[33^", "F41")
204 E("\x1B[33~", "F19")
205 E("\x1B[34^", "F42")
206 E("\x1B[34~", "F20")
207 E("\x1B""O2A", "scroll-backward")
208 E("\x1B""O2B", "scroll-forward")
209 E("\x1B""O2C", "shift-right")
210 E("\x1B""O2D", "shift-left")
211 E("\x1B""O2P", "F13")
212 E("\x1B""O2Q", "F14")
213 E("\x1B""O2R", "F15")
214 E("\x1B""O2S", "F16")
215 E("\x1B""O3P", "F49")
216 E("\x1B""O3Q", "F50")
217 E("\x1B""O3R", "F51")
218 E("\x1B""O3S", "F52")
219 E("\x1B""O4P", "F61")
220 E("\x1B""O4Q", "F62")
221 E("\x1B""O4R", "F63")
222 E("\x1B""O5C", "shift-right")
223 E("\x1B""O5D", "shift-left")
224 E("\x1B""O5F", "shift-end")
225 E("\x1B""O5H", "shift-home")
226 E("\x1B""O5P", "F25")
227 E("\x1B""O5Q", "F26")
228 E("\x1B""O5R", "F27")
229 E("\x1B""O5S", "F28")
230 E("\x1B""O6P", "F37")
231 E("\x1B""O6Q", "F38")
232 E("\x1B""O6R", "F39")
233 E("\x1B""O6S", "F40")
234 E("\x1B[1~", "home") // 30 terms; alternative "find" (42 terms, but "home" is used in Linux)
235 E("\x1B[2$", "shift-insert")
236 E("\x1B[2z", "insert")
237 E("\x1B[2~", "insert")
238 E("\x1B[3$", "shift-del")
239 E("\x1B[3z", "delete")
240 E("\x1B[3~", "delete")
241 E("\x1B[4~", "end") // 30 terms; alternative "select" (42 terms, but "end" is used in Linux)
242 E("\x1B[5$", "shift-previous")
243 E("\x1B[5~", "page-up") // 86 terms; alternative "A3" (4 terms)
244 E("\x1B[6$", "shift-next")
245 E("\x1B[6~", "page-down") // 86 terms; alternative "C3" (4 terms)
246 E("\x1B[7$", "shift-home")
247 E("\x1B[7~", "home") // 17 terms; alternative "A1" (4 terms)
248 E("\x1B[8$", "shift-end")
249 E("\x1B[8^", "delete-eol")
250 E("\x1B[8~", "end") // 17 terms; alternatives "C1" (4 terms), "delete-eol" (1 term)
251 E("\x1B[>M", "mouse")
252 E("\x1B[[A", "F1")
253 E("\x1B[[B", "F2")
254 E("\x1B[[C", "F3")
255 E("\x1B[[D", "F4")
256 E("\x1B[[E", "F5")
257 E("\x9B""11~", "F1")
258 E("\x9B""12~", "F2")
259 E("\x9B""13~", "F3")
260 E("\x9B""14~", "F4")
261 E("\x9B""15~", "F5")
262 E("\x9B""17~", "F6")
263 E("\x9B""18~", "F7")
264 E("\x9B""19~", "F8")
265 E("\x9B""20~", "F9")
266 E("\x9B""21~", "F10")
267 E("\x9B""23~", "F11")
268 E("\x9B""24~", "F12")
269 E("\x9B""25~", "F13")
270 E("\x9B""26~", "F14")
271 E("\x9B""28~", "F15")
272 E("\x9B""29~", "F16")
273 E("\x9B""31~", "F17")
274 E("\x9B""32~", "F18")
275 E("\x9B""33~", "F19")
276 E("\x9B""34~", "F20")
277 E("\x1B""2$", "shift-insert")
278 E("\x1B""OA", "up")
279 E("\x1B""OB", "down")
280 E("\x1B""OC", "right")
281 E("\x1B""OD", "left")
282 E("\x1B""OE", "B2") // 16 terms; alternative "begin" (5 terms)
283 E("\x1B""OF", "end")
284 E("\x1B""OH", "home")
285 E("\x1B""OM", "send")
286 E("\x1B""OP", "F1")
287 E("\x1B""OQ", "F2")
288 E("\x1B""OR", "F3")
289 E("\x1B""OS", "F4")
290 E("\x1B""OT", "F5")
291 E("\x1B""OU", "F6")
292 E("\x1B""OV", "F7")
293 E("\x1B""OW", "F8")
294 E("\x1B""OX", "F9")
295 E("\x1B""OY", "F10")
296 E("\x1B""OZ", "F11")
297 E("\x1B""O[", "F12")
298 E("\x1B""Ol", "F8")
299 E("\x1B""On", "C3")
300 E("\x1B""Op", "C1")
301 E("\x1B""Oq", "C1") // 17 terms; alternatives "A1" (5 terms), "F0" (1 term)
302 E("\x1B""Or", "B2")
303 E("\x1B""Os", "C3") // 17 terms; alternative "A3" (7 terms)
304 E("\x1B""Ot", "F5")
305 E("\x1B""Ou", "B2") // 21 terms; alternative "F6" (4 terms), "begin" (4 terms)
306 E("\x1B""Ov", "F7")
307 E("\x1B""Ow", "A1") // 17 terms; alternative "F9" (4 terms)
308 E("\x1B""Ox", "F10")
309 E("\x1B""Oy", "A3") // 17 terms; alternative "F0" (5 terms)
310 E("\x1B[9", "delete")
311 E("\x1B[@", "F41") // 4 terms; alternative "insert" (3 terms)
312 E("\x1B[A", "up")
313 E("\x1B[B", "down")
314 E("\x1B[C", "right")
315 E("\x1B[D", "left")
316 E("\x1B[E", "B2") // 9 terms; alternative "begin" (1 term)
317 E("\x1B[F", "end") // 5 terms; alternative "lower-left" (3 terms)
318 E("\x1B[G", "B2") // 9 terms; alternative "page-down" (4 terms)
319 E("\x1B[H", "home")
320 E("\x1B[I", "page-up")
321 E("\x1B[L", "insert")
322 E("\x1B[M", "mouse") // 83 terms; alternative "F1" (4 terms)
323 E("\x1B[N", "F2")
324 E("\x1B[O", "F3")
325 E("\x1B[P", "F4")
326 E("\x1B[Q", "F5")
327 E("\x1B[R", "F6")
328 E("\x1B[S", "F7")
329 E("\x1B[T", "F8")
330 E("\x1B[U", "F9") // 4 terms; alternative "page-down" (3 terms)
331 E("\x1B[V", "F10") // 4 terms; alternative "page-dup" (3 terms)
332 E("\x1B[W", "F11")
333 E("\x1B[X", "F12")
334 E("\x1B[Y", "F13") // 4 terms; alternative "end" (3 terms)
335 E("\x1B[Z", "back-tab") // 59 terms; alternative "F14" (4 terms)
336 E("\x1B[[", "F42")
337 E("\x1B[\\", "F43")
338 E("\x1B[]", "F44")
339 E("\x1B[^", "F45")
340 E("\x1B[_", "F46")
341 E("\x1B[`", "F47")
342 E("\x1B[a", "F15")
343 E("\x1B[b", "F16")
344 E("\x1B[c", "shift-right") // 15 terms; alternative "F17" (4 terms)
345 E("\x1B[d", "shift-left") // 15 terms; alternative "F18" (4 terms)
346 E("\x1B[e", "F19")
347 E("\x1B[f", "F20")
348 E("\x1B[g", "F21")
349 E("\x1B[h", "F22")
350 E("\x1B[i", "F23")
351 E("\x1B[j", "F24")
352 E("\x1B[k", "F25")
353 E("\x1B[l", "F26")
354 E("\x1B[m", "F27")
355 E("\x1B[n", "F28")
356 E("\x1B[o", "F29")
357 E("\x1B[p", "F30")
358 E("\x1B[q", "F31")
359 E("\x1B[r", "F32")
360 E("\x1B[s", "F33")
361 E("\x1B[t", "F34")
362 E("\x1B[u", "F35")
363 E("\x1B[v", "F36")
364 E("\x1B[w", "F37")
365 E("\x1B[x", "F38")
366 E("\x1B[y", "F39")
367 E("\x1B[z", "F40")
368 E("\x1B[{", "F48")
369 E("\x9B""1~", "home")
370 E("\x9B""2~", "insert")
371 E("\x9B""3~", "delete")
372 E("\x9B""4~", "end")
373 E("\x9B""5~", "page-up")
374 E("\x9B""6~", "page-down")
375 E("\x1B""A", "up")
376 E("\x1B""B", "down")
377 E("\x1B""C", "right")
378 E("\x1B""D", "left")
379 E("\x1B""F", "end")
380 E("\x1B""J", "clear")
381 E("\x1B""P", "delete")
382 E("\x1B""Q", "insert")
383 E("\x1B""S", "page-down")
384 E("\x1B""T", "page-up")
385 E("\x1B""h", "home")
386 E("\x1B""p", "F1")
387 E("\x1B""q", "F2")
388 E("\x1B""r", "F3")
389 E("\x1B""s", "F4")
390 E("\x1B""t", "F5")
391 E("\x1B""u", "F6")
392 E("\x1B""v", "F7")
393 E("\x1B""w", "F8")
394 E("\x1B\x09", "back-tab")
395 E("\x8F""A", "up")
396 E("\x8F""B", "down")
397 E("\x8F""C", "right")
398 E("\x8F""D", "left")
399 E("\x8F""E", "begin")
400 E("\x8F""M", "send")
401 E("\x8F""q", "C1")
402 E("\x8F""s", "C3")
403 E("\x8F""u", "A3")
404 E("\x8F""w", "A1")
405 E("\x8F""y", "B2")
406 E("\x9B""M", "mouse")
407 E("\x9B""Z", "back-tab")
408
409 E("\x1B", "esc")