Subversion Repositories HelenOS

Rev

Rev 4669 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4651 pillai 1
/*
2
 * Copyright (c) 2009 Vineeth Pillai
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 *
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.
16
 *
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, U_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.
27
 */
28
 
29
/** @addtogroup genarch
30
 * @{
31
 */
32
/**
33
 * @file
34
 * @brief   Scan codes for pl050 keyboards.
35
 */
36
#include <genarch/kbrd/scanc.h>
37
#include <typedefs.h>
38
#include <string.h>
39
 
40
 
41
/** Primary meaning of scancodes. */
42
wchar_t sc_primary_map[] = {
43
    U_NULL, /* 0x00 */
44
    U_SPECIAL, /* 0x01 - F9 */
45
    U_SPECIAL, /* 0x02 - F7 */
46
    U_SPECIAL, /* 0x03 - F5 */
47
    U_SPECIAL, /* 0x04 - F3 */
48
    U_SPECIAL, /* 0x05 - F1 */
49
    U_SPECIAL, /* 0x06 - F2 */
50
    U_SPECIAL, /* 0x07 - F12 */
51
    U_SPECIAL, /* 0x08 -  */
52
    U_SPECIAL, /* 0x09 - F10 */
53
    U_SPECIAL, /* 0x0A - F8 */
54
    U_SPECIAL, /* 0x0B - F10 */
55
    U_SPECIAL, /* 0x0C - F4 */
56
    '\t', /* 0x0D - Tab */
57
    '`',
58
    U_SPECIAL, /* 0x0F */
59
    U_SPECIAL, /* 0x10 */
60
    U_SPECIAL, /* 0x11 - LAlt */
61
    U_SPECIAL, /* 0x12 - LShift */
62
    U_SPECIAL, /* ox13 */
63
    U_SPECIAL, /* 0x14 Ctrl */
64
    'q', '1',
65
    U_SPECIAL, /* 0x17 */
66
    U_SPECIAL, /* 0x18 */
67
    U_SPECIAL, /* 0x19 */
68
    'z', 's', 'a', 'w', '2',
69
    U_SPECIAL, /* 0x1F */
70
    U_SPECIAL, /* 0x20 */
71
    'c', 'x', 'd', 'e', '4', '3',
72
    U_SPECIAL, /* 0x27 */
73
    U_SPECIAL, /* 0x28 */
74
    ' ', 'v', 'f', 't', 'r', '5',
75
    U_SPECIAL, /* 0x2F */
76
    U_SPECIAL, /* 0x30 */
77
    'n', 'b', 'h', 'g', 'y', '6',
78
    U_SPECIAL, /* 0x37 */
79
    U_SPECIAL, /* 0x38 */
80
    U_SPECIAL, /* 0x39 */
81
    'm', 'j', 'u', '7', '8',
82
    U_SPECIAL, /* 0x3F */
83
    U_SPECIAL, /* 0x40 */
84
    ',', 'k', 'i', 'o', '0', '9',
85
    U_SPECIAL, /* 0x47 */
86
    U_SPECIAL, /* 0x48 */
87
    '.', '/', 'l', ';', 'p', '-',
88
    U_SPECIAL, /* 0x4F */
89
    U_SPECIAL, /* 0x50 */
90
    U_SPECIAL, /* 0x51 */
91
    '\'',
92
    U_SPECIAL, /* 0x53 */
93
    '[', '=',
94
    U_SPECIAL, /* 0x56 */
95
    U_SPECIAL, /* 0x57 */
96
    U_SPECIAL, /* 0x58 - Caps Lock */
97
    U_SPECIAL, /* 0x59 - RShift */
98
    '\n', ']',
99
    U_SPECIAL, /* 0x5C */
100
    '\\',
101
    U_SPECIAL, /* 0x5E */
102
    U_SPECIAL, /* 0x5F */
103
    U_SPECIAL, /* 0x60 */
104
    U_SPECIAL, /* 0x61 */
105
    U_SPECIAL, /* 0x62 */
106
    U_SPECIAL, /* 0x63 */
107
    U_SPECIAL, /* 0x64 */
108
    U_SPECIAL, /* 0x65 */
109
    '\b', /* 0x66  - backspace*/
110
    U_SPECIAL, /* 0x67 */
111
    U_SPECIAL, /* 0x68 */
112
    U_END_ARROW, /* 0x69 */
113
    U_SPECIAL, /* 0x6a */
114
    U_LEFT_ARROW, /* 0x6b - Left Arrow */
115
    U_SPECIAL, /* 0x6c */
116
    U_SPECIAL, /* 0x6d */
117
    U_SPECIAL, /* 0x6e */
118
    U_SPECIAL, /* 0x6f */
119
    U_SPECIAL, /* 0x70 */
120
    U_DELETE, /* 0x71 - Del*/
121
    U_DOWN_ARROW, /* 0x72 Down Arrow */
122
    U_SPECIAL, /* 0x73 */
123
    U_RIGHT_ARROW, /* 0x74  - Right Arrow */
124
    U_UP_ARROW, /* 0x75  Up Arrow */
125
    U_ESCAPE, /* 0x76 Esc */
126
    U_SPECIAL, /* 0x77 - NumLock*/
127
    U_SPECIAL, /* 0x78  F11*/
128
    U_SPECIAL, /* 0x79 */
129
    U_PAGE_DOWN, /* 0x7a */
130
    U_SPECIAL, /* 0x7b */
131
    U_SPECIAL, /* 0x7c */
132
    U_PAGE_UP, /* 0x7d */
133
    U_SPECIAL, /* 0x7e */
134
    U_SPECIAL /* 0x7f */
135
};
136
 
137
/** Secondary meaning of scancodes. */
138
wchar_t sc_secondary_map[] = {
139
    U_NULL, /* 0x00 */
140
    U_SPECIAL, /* 0x01 - F9 */
141
    U_SPECIAL, /* 0x02 - F7 */
142
    U_SPECIAL, /* 0x03 - F5 */
143
    U_SPECIAL, /* 0x04 - F3 */
144
    U_SPECIAL, /* 0x05 - F1 */
145
    U_SPECIAL, /* 0x06 - F2 */
146
    U_SPECIAL, /* 0x07 - F12 */
147
    U_SPECIAL, /* 0x08 -  */
148
    U_SPECIAL, /* 0x09 - F10 */
149
    U_SPECIAL, /* 0x0A - F8 */
150
    U_SPECIAL, /* 0x0B - F10 */
151
    U_SPECIAL, /* 0x0C - F4 */
152
    '\t', /* 0x0D - Tab */
153
    '~',
154
    U_SPECIAL, /* 0x0F */
155
    U_SPECIAL, /* 0x10 */
156
    U_SPECIAL, /* 0x11 - LAlt */
157
    U_SPECIAL, /* 0x12 - LShift */
158
    U_SPECIAL, /* ox13 */
159
    U_SPECIAL, /* 0x14 Ctrl */
160
    'Q', '!',
161
    U_SPECIAL, /* 0x17 */
162
    U_SPECIAL, /* 0x18 */
163
    U_SPECIAL, /* 0x19 */
164
    'Z', 'S', 'A', 'W', '@',
165
    U_SPECIAL, /* 0x1F */
166
    U_SPECIAL, /* 0x20 */
167
    'C', 'X', 'D', 'E', '$', '#',
168
    U_SPECIAL, /* 0x27 */
169
    U_SPECIAL, /* 0x28 */
170
    ' ', 'V', 'F', 'T', 'R', '%',
171
    U_SPECIAL, /* 0x2F */
172
    U_SPECIAL, /* 0x30 */
173
    'N', 'B', 'H', 'G', 'Y', '^',
174
    U_SPECIAL, /* 0x37 */
175
    U_SPECIAL, /* 0x38 */
176
    U_SPECIAL, /* 0x39 */
177
    'M', 'J', 'U', '&', '*',
178
    U_SPECIAL, /* 0x3F */
179
    U_SPECIAL, /* 0x40 */
180
    '<', 'K', 'I', 'O', ')', '(',
181
    U_SPECIAL, /* 0x47 */
182
    U_SPECIAL, /* 0x48 */
183
    '>', '?', 'L', ':', 'P', '_',
184
    U_SPECIAL, /* 0x4F */
185
    U_SPECIAL, /* 0x50 */
186
    U_SPECIAL, /* 0x51 */
187
    '"',
188
    U_SPECIAL, /* 0x53 */
189
    '{', '+',
190
    U_SPECIAL, /* 0x56 */
191
    U_SPECIAL, /* 0x57 */
192
    U_SPECIAL, /* 0x58 - Caps Lock */
193
    U_SPECIAL, /* 0x59 - RShift */
194
    '\n', '}',
195
    U_SPECIAL, /* 0x5C */
196
    '|',
197
    U_SPECIAL, /* 0x5E */
198
    U_SPECIAL, /* 0x5F */
199
    U_SPECIAL, /* 0x60 */
200
    U_SPECIAL, /* 0x61 */
201
    U_SPECIAL, /* 0x62 */
202
    U_SPECIAL, /* 0x63 */
203
    U_SPECIAL, /* 0x64 */
204
    U_SPECIAL, /* 0x65 */
205
    '\b', /* 0x66  - backspace*/
206
    U_SPECIAL, /* 0x67 */
207
    U_SPECIAL, /* 0x68 */
208
    U_END_ARROW, /* 0x69 */
209
    U_SPECIAL, /* 0x6a */
210
    U_LEFT_ARROW, /* 0x6b - Left Arrow */
211
    U_SPECIAL, /* 0x6c */
212
    U_SPECIAL, /* 0x6d */
213
    U_SPECIAL, /* 0x6e */
214
    U_SPECIAL, /* 0x6f */
215
    U_SPECIAL, /* 0x70 */
216
    U_DELETE, /* 0x71 - Del*/
217
    U_DOWN_ARROW, /* 0x72 Down Arrow */
218
    U_SPECIAL, /* 0x73 */
219
    U_RIGHT_ARROW, /* 0x74  - Right Arrow */
220
    U_UP_ARROW, /* 0x75  Up Arrow */
221
    U_ESCAPE, /* 0x76 Esc */
222
    U_SPECIAL, /* 0x77 - NumLock*/
223
    U_SPECIAL, /* 0x78  F11*/
224
    U_SPECIAL, /* 0x79 */
225
    U_PAGE_DOWN, /* 0x7a */
226
    U_SPECIAL, /* 0x7b */
227
    U_SPECIAL, /* 0x7c */
228
    U_PAGE_UP, /* 0x7d */
229
    U_SPECIAL, /* 0x7e */
230
    U_SPECIAL /* 0x7f */
231
};
232
 
233
/** @}
234
 */