1 | /* $XFree86: xc/programs/Xserver/hw/xfree86/common/atKeynames.h,v 3.21 2003/10/09 11:43:59 pascal Exp $ */
|
---|
2 | /*
|
---|
3 | * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
|
---|
4 | *
|
---|
5 | * Permission to use, copy, modify, distribute, and sell this software and its
|
---|
6 | * documentation for any purpose is hereby granted without fee, provided that
|
---|
7 | * the above copyright notice appear in all copies and that both that
|
---|
8 | * copyright notice and this permission notice appear in supporting
|
---|
9 | * documentation, and that the name of Thomas Roell not be used in
|
---|
10 | * advertising or publicity pertaining to distribution of the software without
|
---|
11 | * specific, written prior permission. Thomas Roell makes no representations
|
---|
12 | * about the suitability of this software for any purpose. It is provided
|
---|
13 | * "as is" without express or implied warranty.
|
---|
14 | *
|
---|
15 | * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
---|
16 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
---|
17 | * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
---|
18 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
---|
19 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
---|
20 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
---|
21 | * PERFORMANCE OF THIS SOFTWARE.
|
---|
22 | *
|
---|
23 | */
|
---|
24 | /*
|
---|
25 | * Copyright (c) 1994-2003 by The XFree86 Project, Inc.
|
---|
26 | *
|
---|
27 | * Permission is hereby granted, free of charge, to any person obtaining a
|
---|
28 | * copy of this software and associated documentation files (the "Software"),
|
---|
29 | * to deal in the Software without restriction, including without limitation
|
---|
30 | * the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
---|
31 | * and/or sell copies of the Software, and to permit persons to whom the
|
---|
32 | * Software is furnished to do so, subject to the following conditions:
|
---|
33 | *
|
---|
34 | * The above copyright notice and this permission notice shall be included in
|
---|
35 | * all copies or substantial portions of the Software.
|
---|
36 | *
|
---|
37 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
38 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
39 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
---|
40 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
---|
41 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
---|
42 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
43 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
44 | *
|
---|
45 | * Except as contained in this notice, the name of the copyright holder(s)
|
---|
46 | * and author(s) shall not be used in advertising or otherwise to promote
|
---|
47 | * the sale, use or other dealings in this Software without prior written
|
---|
48 | * authorization from the copyright holder(s) and author(s).
|
---|
49 | */
|
---|
50 |
|
---|
51 | /* $XConsortium: atKeynames.h /main/11 1996/03/09 11:17:41 kaleb $ */
|
---|
52 |
|
---|
53 | #ifndef _ATKEYNAMES_H
|
---|
54 | #define _ATKEYNAMES_H
|
---|
55 |
|
---|
56 | #define XK_TECHNICAL
|
---|
57 | #define XK_KATAKANA
|
---|
58 | #include <X11/keysym.h>
|
---|
59 | #include <X11/XF86keysym.h>
|
---|
60 |
|
---|
61 | #define GLYPHS_PER_KEY 4
|
---|
62 | #define NUM_KEYCODES 248
|
---|
63 | #define MIN_KEYCODE 8
|
---|
64 | #define MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1)
|
---|
65 |
|
---|
66 | #define AltMask Mod1Mask
|
---|
67 | #define NumLockMask Mod2Mask
|
---|
68 | #define AltLangMask Mod3Mask
|
---|
69 | #define KanaMask Mod4Mask
|
---|
70 | #define ScrollLockMask Mod5Mask
|
---|
71 |
|
---|
72 | #define KeyPressed(k) (keyc->down[k >> 3] & (1 << (k & 7)))
|
---|
73 | #define ModifierDown(k) ((keyc->state & (k)) == (k))
|
---|
74 |
|
---|
75 | /*
|
---|
76 | * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three)
|
---|
77 | * sets of scancodes. Set3 can only be generated by a MF keyboard.
|
---|
78 | * Set2 sends a makecode for keypress, and the same code prefixed by a
|
---|
79 | * F0 for keyrelease. This is a little bit ugly to handle. Thus we use
|
---|
80 | * here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes.
|
---|
81 | * Bit 7 ist set if the key is released. The code E0 switches to a
|
---|
82 | * different meaning to add the new MF cursorkeys, while not breaking old
|
---|
83 | * applications. E1 is another special prefix. Since I assume that there
|
---|
84 | * will be further versions of PC/XT scancode compatible keyboards, we
|
---|
85 | * may be in trouble one day.
|
---|
86 | *
|
---|
87 | * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3.
|
---|
88 | * 2) Use the keyboards native set and translate it to common keysyms.
|
---|
89 | */
|
---|
90 |
|
---|
91 | /*
|
---|
92 | * definition of the AT84/MF101/MF102 Keyboard:
|
---|
93 | * ============================================================
|
---|
94 | * Defined Key Cap Glyphs Pressed value
|
---|
95 | * Key Name Main Also (hex) (dec)
|
---|
96 | * ---------------- ---------- ------- ------ ------
|
---|
97 | */
|
---|
98 |
|
---|
99 | #define KEY_Escape /* Escape 0x01 */ 1
|
---|
100 | #define KEY_1 /* 1 ! 0x02 */ 2
|
---|
101 | #define KEY_2 /* 2 @ 0x03 */ 3
|
---|
102 | #define KEY_3 /* 3 # 0x04 */ 4
|
---|
103 | #define KEY_4 /* 4 $ 0x05 */ 5
|
---|
104 | #define KEY_5 /* 5 % 0x06 */ 6
|
---|
105 | #define KEY_6 /* 6 ^ 0x07 */ 7
|
---|
106 | #define KEY_7 /* 7 & 0x08 */ 8
|
---|
107 | #define KEY_8 /* 8 * 0x09 */ 9
|
---|
108 | #define KEY_9 /* 9 ( 0x0a */ 10
|
---|
109 | #define KEY_0 /* 0 ) 0x0b */ 11
|
---|
110 | #define KEY_Minus /* - (Minus) _ (Under) 0x0c */ 12
|
---|
111 | #define KEY_Equal /* = (Equal) + 0x0d */ 13
|
---|
112 | #define KEY_BackSpace /* Back Space 0x0e */ 14
|
---|
113 | #define KEY_Tab /* Tab 0x0f */ 15
|
---|
114 | #define KEY_Q /* Q 0x10 */ 16
|
---|
115 | #define KEY_W /* W 0x11 */ 17
|
---|
116 | #define KEY_E /* E 0x12 */ 18
|
---|
117 | #define KEY_R /* R 0x13 */ 19
|
---|
118 | #define KEY_T /* T 0x14 */ 20
|
---|
119 | #define KEY_Y /* Y 0x15 */ 21
|
---|
120 | #define KEY_U /* U 0x16 */ 22
|
---|
121 | #define KEY_I /* I 0x17 */ 23
|
---|
122 | #define KEY_O /* O 0x18 */ 24
|
---|
123 | #define KEY_P /* P 0x19 */ 25
|
---|
124 | #define KEY_LBrace /* [ { 0x1a */ 26
|
---|
125 | #define KEY_RBrace /* ] } 0x1b */ 27
|
---|
126 | #define KEY_Enter /* Enter 0x1c */ 28
|
---|
127 | #define KEY_LCtrl /* Ctrl(left) 0x1d */ 29
|
---|
128 | #define KEY_A /* A 0x1e */ 30
|
---|
129 | #define KEY_S /* S 0x1f */ 31
|
---|
130 | #define KEY_D /* D 0x20 */ 32
|
---|
131 | #define KEY_F /* F 0x21 */ 33
|
---|
132 | #define KEY_G /* G 0x22 */ 34
|
---|
133 | #define KEY_H /* H 0x23 */ 35
|
---|
134 | #define KEY_J /* J 0x24 */ 36
|
---|
135 | #define KEY_K /* K 0x25 */ 37
|
---|
136 | #define KEY_L /* L 0x26 */ 38
|
---|
137 | #define KEY_SemiColon /* ;(SemiColon) :(Colon) 0x27 */ 39
|
---|
138 | #define KEY_Quote /* ' (Apostr) " (Quote) 0x28 */ 40
|
---|
139 | #define KEY_Tilde /* ` (Accent) ~ (Tilde) 0x29 */ 41
|
---|
140 | #define KEY_ShiftL /* Shift(left) 0x2a */ 42
|
---|
141 | #define KEY_BSlash /* \(BckSlash) |(VertBar)0x2b */ 43
|
---|
142 | #define KEY_Z /* Z 0x2c */ 44
|
---|
143 | #define KEY_X /* X 0x2d */ 45
|
---|
144 | #define KEY_C /* C 0x2e */ 46
|
---|
145 | #define KEY_V /* V 0x2f */ 47
|
---|
146 | #define KEY_B /* B 0x30 */ 48
|
---|
147 | #define KEY_N /* N 0x31 */ 49
|
---|
148 | #define KEY_M /* M 0x32 */ 50
|
---|
149 | #define KEY_Comma /* , (Comma) < (Less) 0x33 */ 51
|
---|
150 | #define KEY_Period /* . (Period) >(Greater)0x34 */ 52
|
---|
151 | #define KEY_Slash /* / (Slash) ? 0x35 */ 53
|
---|
152 | #define KEY_ShiftR /* Shift(right) 0x36 */ 54
|
---|
153 | #define KEY_KP_Multiply /* * 0x37 */ 55
|
---|
154 | #define KEY_Alt /* Alt(left) 0x38 */ 56
|
---|
155 | #define KEY_Space /* (SpaceBar) 0x39 */ 57
|
---|
156 | #define KEY_CapsLock /* CapsLock 0x3a */ 58
|
---|
157 | #define KEY_F1 /* F1 0x3b */ 59
|
---|
158 | #define KEY_F2 /* F2 0x3c */ 60
|
---|
159 | #define KEY_F3 /* F3 0x3d */ 61
|
---|
160 | #define KEY_F4 /* F4 0x3e */ 62
|
---|
161 | #define KEY_F5 /* F5 0x3f */ 63
|
---|
162 | #define KEY_F6 /* F6 0x40 */ 64
|
---|
163 | #define KEY_F7 /* F7 0x41 */ 65
|
---|
164 | #define KEY_F8 /* F8 0x42 */ 66
|
---|
165 | #define KEY_F9 /* F9 0x43 */ 67
|
---|
166 | #define KEY_F10 /* F10 0x44 */ 68
|
---|
167 | #define KEY_NumLock /* NumLock 0x45 */ 69
|
---|
168 | #define KEY_ScrollLock /* ScrollLock 0x46 */ 70
|
---|
169 | #define KEY_KP_7 /* 7 Home 0x47 */ 71
|
---|
170 | #define KEY_KP_8 /* 8 Up 0x48 */ 72
|
---|
171 | #define KEY_KP_9 /* 9 PgUp 0x49 */ 73
|
---|
172 | #define KEY_KP_Minus /* - (Minus) 0x4a */ 74
|
---|
173 | #define KEY_KP_4 /* 4 Left 0x4b */ 75
|
---|
174 | #define KEY_KP_5 /* 5 0x4c */ 76
|
---|
175 | #define KEY_KP_6 /* 6 Right 0x4d */ 77
|
---|
176 | #define KEY_KP_Plus /* + (Plus) 0x4e */ 78
|
---|
177 | #define KEY_KP_1 /* 1 End 0x4f */ 79
|
---|
178 | #define KEY_KP_2 /* 2 Down 0x50 */ 80
|
---|
179 | #define KEY_KP_3 /* 3 PgDown 0x51 */ 81
|
---|
180 | #define KEY_KP_0 /* 0 Insert 0x52 */ 82
|
---|
181 | #define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83
|
---|
182 | #define KEY_SysReqest /* SysReqest 0x54 */ 84
|
---|
183 | /* NOTUSED 0x55 */
|
---|
184 | #define KEY_Less /* < (Less) >(Greater) 0x56 */ 86
|
---|
185 | #define KEY_F11 /* F11 0x57 */ 87
|
---|
186 | #define KEY_F12 /* F12 0x58 */ 88
|
---|
187 |
|
---|
188 | #define KEY_Prefix0 /* special 0x60 */ 96
|
---|
189 | #define KEY_Prefix1 /* specail 0x61 */ 97
|
---|
190 |
|
---|
191 | /*
|
---|
192 | * The 'scancodes' below are generated by the server, because the MF101/102
|
---|
193 | * keyboard sends them as sequence of other scancodes
|
---|
194 | */
|
---|
195 | #define KEY_Home /* Home 0x59 */ 89
|
---|
196 | #define KEY_Up /* Up 0x5a */ 90
|
---|
197 | #define KEY_PgUp /* PgUp 0x5b */ 91
|
---|
198 | #define KEY_Left /* Left 0x5c */ 92
|
---|
199 | #define KEY_Begin /* Begin 0x5d */ 93
|
---|
200 | #define KEY_Right /* Right 0x5e */ 94
|
---|
201 | #define KEY_End /* End 0x5f */ 95
|
---|
202 | #define KEY_Down /* Down 0x60 */ 96
|
---|
203 | #define KEY_PgDown /* PgDown 0x61 */ 97
|
---|
204 | #define KEY_Insert /* Insert 0x62 */ 98
|
---|
205 | #define KEY_Delete /* Delete 0x63 */ 99
|
---|
206 | #define KEY_KP_Enter /* Enter 0x64 */ 100
|
---|
207 | #define KEY_RCtrl /* Ctrl(right) 0x65 */ 101
|
---|
208 | #define KEY_Pause /* Pause 0x66 */ 102
|
---|
209 | #define KEY_Print /* Print 0x67 */ 103
|
---|
210 | #define KEY_KP_Divide /* Divide 0x68 */ 104
|
---|
211 | #define KEY_AltLang /* AtlLang(right) 0x69 */ 105
|
---|
212 | #define KEY_Break /* Break 0x6a */ 106
|
---|
213 | #define KEY_LMeta /* Left Meta 0x6b */ 107
|
---|
214 | #define KEY_RMeta /* Right Meta 0x6c */ 108
|
---|
215 | #define KEY_Menu /* Menu 0x6d */ 109
|
---|
216 | #define KEY_F13 /* F13 0x6e */ 110
|
---|
217 | #define KEY_F14 /* F14 0x6f */ 111
|
---|
218 | #define KEY_F15 /* F15 0x70 */ 112
|
---|
219 | #define KEY_HKTG /* Hirugana/Katakana tog 0x70 */ 112
|
---|
220 | #define KEY_F16 /* F16 0x71 */ 113
|
---|
221 | #define KEY_F17 /* F17 0x72 */ 114
|
---|
222 | #define KEY_KP_DEC /* KP_DEC 0x73 */ 115
|
---|
223 | #define KEY_BSlash2 /* \ _ 0x73 */ 115
|
---|
224 | #define KEY_KP_Equal /* Equal (Keypad) 0x76 */ 118
|
---|
225 | #define KEY_XFER /* Kanji Transfer 0x79 */ 121
|
---|
226 | #define KEY_NFER /* No Kanji Transfer 0x7b */ 123
|
---|
227 | #define KEY_Yen /* Yen 0x7d */ 125
|
---|
228 |
|
---|
229 | #define KEY_Power /* Power Key 0x84 */ 132
|
---|
230 | #define KEY_Mute /* Audio Mute 0x85 */ 133
|
---|
231 | #define KEY_AudioLower /* Audio Lower 0x86 */ 134
|
---|
232 | #define KEY_AudioRaise /* Audio Raise 0x87 */ 135
|
---|
233 | #define KEY_Help /* Help 0x88 */ 136
|
---|
234 | #define KEY_L1 /* Stop 0x89 */ 137
|
---|
235 | #define KEY_L2 /* Again 0x8a */ 138
|
---|
236 | #define KEY_L3 /* Props 0x8b */ 139
|
---|
237 | #define KEY_L4 /* Undo 0x8c */ 140
|
---|
238 | #define KEY_L5 /* Front 0x8d */ 141
|
---|
239 | #define KEY_L6 /* Copy 0x8e */ 142
|
---|
240 | #define KEY_L7 /* Open 0x8f */ 143
|
---|
241 | #define KEY_L8 /* Paste 0x90 */ 144
|
---|
242 | #define KEY_L9 /* Find 0x91 */ 145
|
---|
243 | #define KEY_L10 /* Cut 0x92 */ 146
|
---|
244 |
|
---|
245 | /*
|
---|
246 | * Fake 'scancodes' in the following ranges are generated for 2-byte
|
---|
247 | * codes not handled elsewhere. These correspond to most extended keys
|
---|
248 | * on so-called "Internet" keyboards:
|
---|
249 | *
|
---|
250 | * 0x79-0x93
|
---|
251 | * 0x96-0xa1
|
---|
252 | * 0xa3-0xac
|
---|
253 | * 0xb1-0xb4
|
---|
254 | * 0xba-0xbd
|
---|
255 | * 0xc2
|
---|
256 | * 0xcc-0xd2
|
---|
257 | * 0xd6-0xf7
|
---|
258 | */
|
---|
259 |
|
---|
260 | /*
|
---|
261 | * Remapped 'scancodes' are generated for single-byte codes in the range
|
---|
262 | * 0x59-0x5f,0x62-0x76. These are used for some extra keys on some keyboards.
|
---|
263 | */
|
---|
264 |
|
---|
265 | #define KEY_0x59 0x95
|
---|
266 | #define KEY_0x5A 0xA2
|
---|
267 | #define KEY_0x5B 0xAD
|
---|
268 | #define KEY_0x5C KEY_KP_EQUAL
|
---|
269 | #define KEY_0x5D 0xAE
|
---|
270 | #define KEY_0x5E 0xAF
|
---|
271 | #define KEY_0x5F 0xB0
|
---|
272 | #define KEY_0x62 0xB5
|
---|
273 | #define KEY_0x63 0xB6
|
---|
274 | #define KEY_0x64 0xB7
|
---|
275 | #define KEY_0x65 0xB8
|
---|
276 | #define KEY_0x66 0xB9
|
---|
277 | #define KEY_0x67 0xBE
|
---|
278 | #define KEY_0x68 0xBF
|
---|
279 | #define KEY_0x69 0xC0
|
---|
280 | #define KEY_0x6A 0xC1
|
---|
281 | #define KEY_0x6B 0xC3
|
---|
282 | #define KEY_0x6C 0xC4
|
---|
283 | #define KEY_0x6D 0xC5
|
---|
284 | #define KEY_0x6E 0xC6
|
---|
285 | #define KEY_0x6F 0xC7
|
---|
286 | #define KEY_0x70 0xC8
|
---|
287 | #define KEY_0x71 0xC9
|
---|
288 | #define KEY_0x72 0xCA
|
---|
289 | #define KEY_0x73 0xCB
|
---|
290 | #define KEY_0x74 0xD3
|
---|
291 | #define KEY_0x75 0xD4
|
---|
292 | #define KEY_0x76 0xD5
|
---|
293 |
|
---|
294 | /* These are for "notused" and "unknown" entries in translation maps. */
|
---|
295 | #define KEY_NOTUSED 0
|
---|
296 | #define KEY_UNKNOWN 255
|
---|
297 |
|
---|
298 | #endif /* _ATKEYNAMES_H */
|
---|