2
* Copyright (c) 2009 Jiri Svoboda
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 Macintosh ADB keyboards.
37
#include <genarch/kbrd/scanc.h>
41
/** Primary meaning of scancodes. */
42
wchar_t sc_primary_map[SCANCODES] = {
79
[0x24] = '\n', /* Enter */
91
[0x30] = '\t', /* Tab */
92
[0x31] = ' ', /* Space */
94
[0x33] = '\b', /* Backspace */
102
[0x3b] = U_LEFT_ARROW,
103
[0x3c] = U_RIGHT_ARROW,
104
[0x3d] = U_DOWN_ARROW,
108
[0x41] = '.', /* Num Separator */
110
[0x43] = '*', /* Num Times */
112
[0x45] = '+', /* Num Plus */
118
[0x4b] = '/', /* Num Divide */
121
[0x4e] = '-', /* Num Minus */
125
[0x52] = '0', /* Num Zero */
126
[0x53] = '1', /* Num One */
127
[0x54] = '2', /* Num Two */
128
[0x55] = '3', /* Num Three */
129
[0x56] = '4', /* Num Four */
130
[0x57] = '5', /* Num Five */
131
[0x58] = '6', /* Num Six */
132
[0x59] = '7', /* Num Seven */
134
[0x5b] = '8', /* Num Eight */
135
[0x5c] = '9', /* Num Nine */
158
[0x73] = U_HOME_ARROW,
164
[0x79] = U_PAGE_DOWN,
173
/** Secondary meaning of scancodes. */
174
wchar_t sc_secondary_map[SCANCODES] = {
211
[0x24] = '\n', /* Enter */
223
[0x30] = '\t', /* Tab */
224
[0x31] = ' ', /* Space */
226
[0x33] = '\b', /* Backspace */
240
[0x41] = '.', /* Num Separator */
242
[0x43] = '*', /* Num Times */
244
[0x45] = '+', /* Num Plus */
250
[0x4b] = '/', /* Num Divide */
253
[0x4e] = '-', /* Num Minus */
257
[0x52] = '0', /* Num Zero */
258
[0x53] = '1', /* Num One */
259
[0x54] = '2', /* Num Two */
260
[0x55] = '3', /* Num Three */
261
[0x56] = '4', /* Num Four */
262
[0x57] = '5', /* Num Five */
263
[0x58] = '6', /* Num Six */
264
[0x59] = '7', /* Num Seven */
266
[0x5b] = '8', /* Num Eight */
267
[0x5c] = '9', /* Num Nine */