concept/mproof: Fixed an old minor bug in the concept.
[neuro.git] / include / neuro / keymap.h
blobee0262eb5bd7bee096dd866ffefb1af8732de523
1 /* keymap.h
3 * definition of neuro's key mappings.
4 */
6 #ifndef __KEYMAP_H
7 #define __KEYMAP_H
9 #include "neuro_engine.h"
11 /* the keyboard events list
12 * taken from the X11 keymaps.
16 * TTY Functions, cleverly chosen to map to ascii, for convenience of
17 * programming, but could have been arbitrary (at the cost of lookup
18 * tables in client code.
21 #define NKB_BackSpace 0xFF08 /* back space, back char */
22 #define NKB_Tab 0xFF09
23 #define NKB_Linefeed 0xFF0A /* Linefeed, LF */
24 #define NKB_Clear 0xFF0B
25 #define NKB_Return 0xFF0D /* Return, enter */
26 #define NKB_Pause 0xFF13 /* Pause, hold */
27 #define NKB_Scroll_Lock 0xFF14
28 #define NKB_Sys_Req 0xFF15
29 #define NKB_Escape 0xFF1B
30 #define NKB_Delete 0xFFFF /* Delete, rubout */
34 /* International & multi-key character composition */
36 #define NKB_Multi_key 0xFF20 /* Multi-key character compose */
37 #define NKB_Codeinput 0xFF37
38 #define NKB_SingleCandidate 0xFF3C
39 #define NKB_MultipleCandidate 0xFF3D
40 #define NKB_PreviousCandidate 0xFF3E
42 /* Cursor control & motion */
44 #define NKB_Home 0xFF50
45 #define NKB_Left 0xFF51 /* Move left, left arrow */
46 #define NKB_Up 0xFF52 /* Move up, up arrow */
47 #define NKB_Right 0xFF53 /* Move right, right arrow */
48 #define NKB_Down 0xFF54 /* Move down, down arrow */
49 #define NKB_Prior 0xFF55 /* Prior, previous */
50 #define NKB_Page_Up 0xFF55
51 #define NKB_Next 0xFF56 /* Next */
52 #define NKB_Page_Down 0xFF56
53 #define NKB_End 0xFF57 /* EOL */
54 #define NKB_Begin 0xFF58 /* BOL */
57 /* Misc Functions */
59 #define NKB_Select 0xFF60 /* Select, mark */
60 #define NKB_Print 0xFF61
61 #define NKB_Execute 0xFF62 /* Execute, run, do */
62 #define NKB_Insert 0xFF63 /* Insert, insert here */
63 #define NKB_Undo 0xFF65 /* Undo, oops */
64 #define NKB_Redo 0xFF66 /* redo, again */
65 #define NKB_Menu 0xFF67
66 #define NKB_Find 0xFF68 /* Find, search */
67 #define NKB_Cancel 0xFF69 /* Cancel, stop, abort, exit */
68 #define NKB_Help 0xFF6A /* Help */
69 #define NKB_Break 0xFF6B
70 #define NKB_Mode_switch 0xFF7E /* Character set switch */
71 #define NKB_script_switch 0xFF7E /* Alias for mode_switch */
72 #define NKB_Num_Lock 0xFF7F
74 /* Keypad Functions, keypad numbers cleverly chosen to map to ascii */
76 #define NKB_KP_Space 0xFF80 /* space */
77 #define NKB_KP_Tab 0xFF89
78 #define NKB_KP_Enter 0xFF8D /* enter */
79 #define NKB_KP_F1 0xFF91 /* PF1, KP_A, ... */
80 #define NKB_KP_F2 0xFF92
81 #define NKB_KP_F3 0xFF93
82 #define NKB_KP_F4 0xFF94
83 #define NKB_KP_Home 0xFF95
84 #define NKB_KP_Left 0xFF96
85 #define NKB_KP_Up 0xFF97
86 #define NKB_KP_Right 0xFF98
87 #define NKB_KP_Down 0xFF99
88 #define NKB_KP_Prior 0xFF9A
89 #define NKB_KP_Page_Up 0xFF9A
90 #define NKB_KP_Next 0xFF9B
91 #define NKB_KP_Page_Down 0xFF9B
92 #define NKB_KP_End 0xFF9C
93 #define NKB_KP_Begin 0xFF9D
94 #define NKB_KP_Insert 0xFF9E
95 #define NKB_KP_Delete 0xFF9F
96 #define NKB_KP_Equal 0xFFBD /* equals */
97 #define NKB_KP_Multiply 0xFFAA
98 #define NKB_KP_Add 0xFFAB
99 #define NKB_KP_Separator 0xFFAC /* separator, often comma */
100 #define NKB_KP_Subtract 0xFFAD
101 #define NKB_KP_Decimal 0xFFAE
102 #define NKB_KP_Divide 0xFFAF
104 #define NKB_KP_0 0xFFB0
105 #define NKB_KP_1 0xFFB1
106 #define NKB_KP_2 0xFFB2
107 #define NKB_KP_3 0xFFB3
108 #define NKB_KP_4 0xFFB4
109 #define NKB_KP_5 0xFFB5
110 #define NKB_KP_6 0xFFB6
111 #define NKB_KP_7 0xFFB7
112 #define NKB_KP_8 0xFFB8
113 #define NKB_KP_9 0xFFB9
118 * Auxilliary Functions; note the duplicate definitions for left and right
119 * function keys; Sun keyboards and a few other manufactures have such
120 * function key groups on the left and/or right sides of the keyboard.
121 * We've not found a keyboard with more than 35 function keys total.
124 #define NKB_F1 0xFFBE
125 #define NKB_F2 0xFFBF
126 #define NKB_F3 0xFFC0
127 #define NKB_F4 0xFFC1
128 #define NKB_F5 0xFFC2
129 #define NKB_F6 0xFFC3
130 #define NKB_F7 0xFFC4
131 #define NKB_F8 0xFFC5
132 #define NKB_F9 0xFFC6
133 #define NKB_F10 0xFFC7
134 #define NKB_F11 0xFFC8
135 #define NKB_L1 0xFFC8
136 #define NKB_F12 0xFFC9
137 #define NKB_L2 0xFFC9
138 #define NKB_F13 0xFFCA
139 #define NKB_L3 0xFFCA
140 #define NKB_F14 0xFFCB
141 #define NKB_L4 0xFFCB
142 #define NKB_F15 0xFFCC
143 #define NKB_L5 0xFFCC
144 #define NKB_F16 0xFFCD
145 #define NKB_L6 0xFFCD
146 #define NKB_F17 0xFFCE
147 #define NKB_L7 0xFFCE
148 #define NKB_F18 0xFFCF
149 #define NKB_L8 0xFFCF
150 #define NKB_F19 0xFFD0
151 #define NKB_L9 0xFFD0
152 #define NKB_F20 0xFFD1
153 #define NKB_L10 0xFFD1
154 #define NKB_F21 0xFFD2
155 #define NKB_R1 0xFFD2
156 #define NKB_F22 0xFFD3
157 #define NKB_R2 0xFFD3
158 #define NKB_F23 0xFFD4
159 #define NKB_R3 0xFFD4
160 #define NKB_F24 0xFFD5
161 #define NKB_R4 0xFFD5
162 #define NKB_F25 0xFFD6
163 #define NKB_R5 0xFFD6
164 #define NKB_F26 0xFFD7
165 #define NKB_R6 0xFFD7
166 #define NKB_F27 0xFFD8
167 #define NKB_R7 0xFFD8
168 #define NKB_F28 0xFFD9
169 #define NKB_R8 0xFFD9
170 #define NKB_F29 0xFFDA
171 #define NKB_R9 0xFFDA
172 #define NKB_F30 0xFFDB
173 #define NKB_R10 0xFFDB
174 #define NKB_F31 0xFFDC
175 #define NKB_R11 0xFFDC
176 #define NKB_F32 0xFFDD
177 #define NKB_R12 0xFFDD
178 #define NKB_F33 0xFFDE
179 #define NKB_R13 0xFFDE
180 #define NKB_F34 0xFFDF
181 #define NKB_R14 0xFFDF
182 #define NKB_F35 0xFFE0
183 #define NKB_R15 0xFFE0
185 /* Modifiers */
187 #define NKB_Shift_L 0xFFE1 /* Left shift */
188 #define NKB_Shift_R 0xFFE2 /* Right shift */
189 #define NKB_Control_L 0xFFE3 /* Left control */
190 #define NKB_Control_R 0xFFE4 /* Right control */
191 #define NKB_Caps_Lock 0xFFE5 /* Caps lock */
192 #define NKB_Shift_Lock 0xFFE6 /* Shift lock */
194 #define NKB_Meta_L 0xFFE7 /* Left meta */
195 #define NKB_Meta_R 0xFFE8 /* Right meta */
196 #define NKB_Alt_L 0xFFE9 /* Left alt */
197 #define NKB_Alt_R 0xFFEA /* Right alt */
198 #define NKB_Super_L 0xFFEB /* Left super */
199 #define NKB_Super_R 0xFFEC /* Right super */
200 #define NKB_Hyper_L 0xFFED /* Left hyper */
201 #define NKB_Hyper_R 0xFFEE /* Right hyper */
206 #define NKB_space 0x020
207 #define NKB_exclam 0x021
208 #define NKB_quotedbl 0x022
209 #define NKB_numbersign 0x023
210 #define NKB_dollar 0x024
211 #define NKB_percent 0x025
212 #define NKB_ampersand 0x026
213 #define NKB_apostrophe 0x027
214 #define NKB_quoteright 0x027 /* deprecated */
215 #define NKB_parenleft 0x028
216 #define NKB_parenright 0x029
217 #define NKB_asterisk 0x02a
218 #define NKB_plus 0x02b
219 #define NKB_comma 0x02c
220 #define NKB_minus 0x02d
221 #define NKB_period 0x02e
222 #define NKB_slash 0x02f
223 #define NKB_0 0x030
224 #define NKB_1 0x031
225 #define NKB_2 0x032
226 #define NKB_3 0x033
227 #define NKB_4 0x034
228 #define NKB_5 0x035
229 #define NKB_6 0x036
230 #define NKB_7 0x037
231 #define NKB_8 0x038
232 #define NKB_9 0x039
233 #define NKB_colon 0x03a
234 #define NKB_semicolon 0x03b
235 #define NKB_less 0x03c
236 #define NKB_equal 0x03d
237 #define NKB_greater 0x03e
238 #define NKB_question 0x03f
239 #define NKB_at 0x040
240 #define NKB_A 0x041
241 #define NKB_B 0x042
242 #define NKB_C 0x043
243 #define NKB_D 0x044
244 #define NKB_E 0x045
245 #define NKB_F 0x046
246 #define NKB_G 0x047
247 #define NKB_H 0x048
248 #define NKB_I 0x049
249 #define NKB_J 0x04a
250 #define NKB_K 0x04b
251 #define NKB_L 0x04c
252 #define NKB_M 0x04d
253 #define NKB_N 0x04e
254 #define NKB_O 0x04f
255 #define NKB_P 0x050
256 #define NKB_Q 0x051
257 #define NKB_R 0x052
258 #define NKB_S 0x053
259 #define NKB_T 0x054
260 #define NKB_U 0x055
261 #define NKB_V 0x056
262 #define NKB_W 0x057
263 #define NKB_X 0x058
264 #define NKB_Y 0x059
265 #define NKB_Z 0x05a
266 #define NKB_bracketleft 0x05b
267 #define NKB_backslash 0x05c
268 #define NKB_bracketright 0x05d
269 #define NKB_asciicircum 0x05e
270 #define NKB_underscore 0x05f
271 #define NKB_grave 0x060
272 #define NKB_quoteleft 0x060 /* deprecated */
273 #define NKB_a 0x061
274 #define NKB_b 0x062
275 #define NKB_c 0x063
276 #define NKB_d 0x064
277 #define NKB_e 0x065
278 #define NKB_f 0x066
279 #define NKB_g 0x067
280 #define NKB_h 0x068
281 #define NKB_i 0x069
282 #define NKB_j 0x06a
283 #define NKB_k 0x06b
284 #define NKB_l 0x06c
285 #define NKB_m 0x06d
286 #define NKB_n 0x06e
287 #define NKB_o 0x06f
288 #define NKB_p 0x070
289 #define NKB_q 0x071
290 #define NKB_r 0x072
291 #define NKB_s 0x073
292 #define NKB_t 0x074
293 #define NKB_u 0x075
294 #define NKB_v 0x076
295 #define NKB_w 0x077
296 #define NKB_x 0x078
297 #define NKB_y 0x079
298 #define NKB_z 0x07a
299 #define NKB_braceleft 0x07b
300 #define NKB_bar 0x07c
301 #define NKB_braceright 0x07d
302 #define NKB_asciitilde 0x07e
304 #endif /* NOT __KEYMAP_H */