2
* Copyright (c) 2006 Jakub Jermar
5
* Redistribution and use in source and binary forms, with or without
6
* modification, are permitted provided that the following conditions
9
* - Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* - Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
* - The name of the author may not be used to endorse or promote products
15
* derived from this software without specific prior written permission.
17
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
/** @addtogroup genarch
34
* @brief Scan codes for Sun keyboards.
37
#include <genarch/kbrd/scanc.h>
41
/** Primary meaning of scancodes. */
42
wchar_t sc_primary_map[SCANCODES] = {
48
[0x05] = U_SPECIAL, /* F1 */
49
[0x06] = U_SPECIAL, /* F2 */
50
[0x07] = U_SPECIAL, /* F10 */
51
[0x08] = U_SPECIAL, /* F3 */
52
[0x09] = U_SPECIAL, /* F11 */
53
[0x0a] = U_SPECIAL, /* F4 */
54
[0x0b] = U_SPECIAL, /* F12 */
55
[0x0c] = U_SPECIAL, /* F5 */
56
[0x0d] = U_SPECIAL, /* Right Alt */
57
[0x0e] = U_SPECIAL, /* F6 */
59
[0x10] = U_SPECIAL, /* F7 */
60
[0x11] = U_SPECIAL, /* F8 */
61
[0x12] = U_SPECIAL, /* F9 */
62
[0x13] = U_SPECIAL, /* Left Alt */
63
[0x14] = U_UP_ARROW, /* Up Arrow */
64
[0x15] = U_SPECIAL, /* Pause */
66
[0x17] = U_SPECIAL, /* Scroll Lock */
67
[0x18] = U_LEFT_ARROW, /* Left Arrow */
70
[0x1b] = U_DOWN_ARROW, /* Down Arrow */
71
[0x1c] = U_RIGHT_ARROW, /* Right Arrow */
72
[0x1d] = U_ESCAPE, /* Esc */
86
[0x2b] = '\b', /* Backspace */
87
[0x2c] = U_SPECIAL, /* Insert */
89
[0x2e] = '/', /* Numpad / */
90
[0x2f] = '*', /* Numpad * */
93
[0x32] = '.', /* Numpad . */
95
[0x34] = U_HOME_ARROW, /* Home */
96
[0x35] = '\t', /* Tab */
109
[0x42] = U_DELETE, /* Delete */
111
[0x44] = '7', /* Numpad 7 */
112
[0x45] = '8', /* Numpad 8 */
113
[0x46] = '9', /* Numpad 9 */
114
[0x47] = '-', /* Numpad - */
117
[0x4a] = U_END_ARROW, /* End */
119
[0x4c] = U_SPECIAL, /* Control */
132
[0x59] = '\n', /* Enter */
133
[0x5a] = '\n', /* Numpad Enter */
134
[0x5b] = '4', /* Numpad 4 */
135
[0x5c] = '5', /* Numpad 5 */
136
[0x5d] = '6', /* Numpad 6 */
137
[0x5e] = '0', /* Numpad 0 */
139
[0x60] = U_PAGE_UP, /* Page Up */
141
[0x62] = U_SPECIAL, /* NumLock */
142
[0x63] = U_SPECIAL, /* Left Shift */
153
[0x6e] = U_SPECIAL, /* Right Shift */
155
[0x70] = '1', /* Numpad 1 */
156
[0x71] = '2', /* Numpad 2 */
157
[0x72] = '3', /* Numpad 3 */
162
[0x77] = U_SPECIAL, /* CapsLock */
166
[0x7b] = U_PAGE_DOWN, /* Page Down */
168
[0x7d] = '+', /* Numpad + */
173
/** Secondary meaning of scancodes. */
174
wchar_t sc_secondary_map[SCANCODES] = {
180
[0x05] = U_SPECIAL, /* F1 */
181
[0x06] = U_SPECIAL, /* F2 */
182
[0x07] = U_SPECIAL, /* F10 */
183
[0x08] = U_SPECIAL, /* F3 */
184
[0x09] = U_SPECIAL, /* F11 */
185
[0x0a] = U_SPECIAL, /* F4 */
186
[0x0b] = U_SPECIAL, /* F12 */
187
[0x0c] = U_SPECIAL, /* F5 */
188
[0x0d] = U_SPECIAL, /* Right Alt */
189
[0x0e] = U_SPECIAL, /* F6 */
191
[0x10] = U_SPECIAL, /* F7 */
192
[0x11] = U_SPECIAL, /* F8 */
193
[0x12] = U_SPECIAL, /* F9 */
194
[0x13] = U_SPECIAL, /* Left Alt */
195
[0x14] = U_UP_ARROW, /* Up Arrow */
196
[0x15] = U_SPECIAL, /* Pause */
198
[0x17] = U_SPECIAL, /* Scroll Lock */
199
[0x18] = U_LEFT_ARROW, /* Left Arrow */
202
[0x1b] = U_DOWN_ARROW, /* Down Arrow */
203
[0x1c] = U_RIGHT_ARROW, /* Right Arrow */
204
[0x1d] = U_ESCAPE, /* Esc */
218
[0x2b] = '\b', /* Backspace */
219
[0x2c] = U_SPECIAL, /* Insert */
221
[0x2e] = '/', /* Numpad / */
222
[0x2f] = '*', /* Numpad * */
225
[0x32] = '.', /* Numpad . */
227
[0x34] = U_HOME_ARROW, /* Home */
228
[0x35] = '\t', /* Tab */
241
[0x42] = U_DELETE, /* Delete */
243
[0x44] = '7', /* Numpad 7 */
244
[0x45] = '8', /* Numpad 8 */
245
[0x46] = '9', /* Numpad 9 */
246
[0x47] = '-', /* Numpad - */
249
[0x4a] = U_END_ARROW, /* End */
251
[0x4c] = U_SPECIAL, /* Control */
264
[0x59] = '\n', /* Enter */
265
[0x5a] = '\n', /* Numpad Enter */
266
[0x5b] = '4', /* Numpad 4 */
267
[0x5c] = '5', /* Numpad 5 */
268
[0x5d] = '6', /* Numpad 6 */
269
[0x5e] = '0', /* Numpad 0 */
271
[0x60] = U_PAGE_UP, /* Page Up */
273
[0x62] = U_SPECIAL, /* NumLock */
274
[0x63] = U_SPECIAL, /* Left Shift */
285
[0x6e] = U_SPECIAL, /* Right Shift */
287
[0x70] = '1', /* Numpad 1 */
288
[0x71] = '2', /* Numpad 2 */
289
[0x72] = '3', /* Numpad 3 */
294
[0x77] = U_SPECIAL, /* CapsLock */
298
[0x7b] = U_PAGE_DOWN, /* Page Down */
300
[0x7d] = '+', /* Numpad + */