Subversion Repositories HelenOS

Rev

Rev 2071 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1339 cejka 1
/*
2071 jermar 2
 * Copyright (c) 2001-2004 Jakub Jermar
3
 * Copyright (c) 2006 Josef Cejka
1339 cejka 4
 * All rights reserved.
5
 *
6
 * Redistribution and use in source and binary forms, with or without
7
 * modification, are permitted provided that the following conditions
8
 * are met:
9
 *
10
 * - Redistributions of source code must retain the above copyright
11
 *   notice, this list of conditions and the following disclaimer.
12
 * - Redistributions in binary form must reproduce the above copyright
13
 *   notice, this list of conditions and the following disclaimer in the
14
 *   documentation and/or other materials provided with the distribution.
15
 * - The name of the author may not be used to endorse or promote products
16
 *   derived from this software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
 */
29
 
1874 jermar 30
/** @addtogroup kbdia32
31
 * @brief   Scancodes for PC keyboards.
1649 cejka 32
 * @{
33
 */
34
/** @file
1657 cejka 35
 * @ingroup kbdamd64
1649 cejka 36
 */
37
 
1874 jermar 38
#include <genarch/scanc.h>
1339 cejka 39
 
40
/** Primary meaning of scancodes. */
1874 jermar 41
int sc_primary_map[] = {
1339 cejka 42
    SPECIAL, /* 0x00 */
43
    SPECIAL, /* 0x01 - Esc */
44
    '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=',
45
    '\b', /* 0x0e - Backspace */
46
    '\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n',
47
    SPECIAL, /* 0x1d - LCtrl */
48
    'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'',
49
    '`',
50
    SPECIAL, /* 0x2a - LShift */
51
    '\\',
52
    'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/',
53
    SPECIAL, /* 0x36 - RShift */
54
    '*',
55
    SPECIAL, /* 0x38 - LAlt */
56
    ' ',
57
    SPECIAL, /* 0x3a - CapsLock */
1560 vana 58
    (FUNCTION_KEYS | 1), /* 0x3b - F1 */
59
    (FUNCTION_KEYS | 2), /* 0x3c - F2 */
60
    (FUNCTION_KEYS | 3), /* 0x3d - F3 */
61
    (FUNCTION_KEYS | 4), /* 0x3e - F4 */
62
    (FUNCTION_KEYS | 5), /* 0x3f - F5 */
63
    (FUNCTION_KEYS | 6), /* 0x40 - F6 */
64
    (FUNCTION_KEYS | 7), /* 0x41 - F7 */
65
    (FUNCTION_KEYS | 8), /* 0x42 - F8 */
66
    (FUNCTION_KEYS | 9), /* 0x43 - F9 */
67
    (FUNCTION_KEYS | 10), /* 0x44 - F10 */
1339 cejka 68
    SPECIAL, /* 0x45 - NumLock */
69
    SPECIAL, /* 0x46 - ScrollLock */
70
    '7', '8', '9', '-',
71
    '4', '5', '6', '+',
72
    '1', '2', '3',
73
    '0', '.',
74
    SPECIAL, /* 0x54 - Alt-SysRq */
75
    SPECIAL, /* 0x55 - F11/F12/PF1/FN */
76
    SPECIAL, /* 0x56 - unlabelled key next to LAlt */
1566 cejka 77
    (FUNCTION_KEYS | 11), /* 0x57 - F11 */
78
    (FUNCTION_KEYS | 12), /* 0x58 - F12 */
1339 cejka 79
    SPECIAL, /* 0x59 */
80
    SPECIAL, /* 0x5a */
81
    SPECIAL, /* 0x5b */
82
    SPECIAL, /* 0x5c */
83
    SPECIAL, /* 0x5d */
84
    SPECIAL, /* 0x5e */
85
    SPECIAL, /* 0x5f */
86
    SPECIAL, /* 0x60 */
87
    SPECIAL, /* 0x61 */
88
    SPECIAL, /* 0x62 */
89
    SPECIAL, /* 0x63 */
90
    SPECIAL, /* 0x64 */
91
    SPECIAL, /* 0x65 */
92
    SPECIAL, /* 0x66 */
93
    SPECIAL, /* 0x67 */
94
    SPECIAL, /* 0x68 */
95
    SPECIAL, /* 0x69 */
96
    SPECIAL, /* 0x6a */
97
    SPECIAL, /* 0x6b */
98
    SPECIAL, /* 0x6c */
99
    SPECIAL, /* 0x6d */
100
    SPECIAL, /* 0x6e */
101
    SPECIAL, /* 0x6f */
102
    SPECIAL, /* 0x70 */
103
    SPECIAL, /* 0x71 */
104
    SPECIAL, /* 0x72 */
105
    SPECIAL, /* 0x73 */
106
    SPECIAL, /* 0x74 */
107
    SPECIAL, /* 0x75 */
108
    SPECIAL, /* 0x76 */
109
    SPECIAL, /* 0x77 */
110
    SPECIAL, /* 0x78 */
111
    SPECIAL, /* 0x79 */
112
    SPECIAL, /* 0x7a */
113
    SPECIAL, /* 0x7b */
114
    SPECIAL, /* 0x7c */
115
    SPECIAL, /* 0x7d */
116
    SPECIAL, /* 0x7e */
117
    SPECIAL, /* 0x7f */
118
};
119
 
120
/** Secondary meaning of scancodes. */
1874 jermar 121
int sc_secondary_map[] = {
1339 cejka 122
    SPECIAL, /* 0x00 */
1644 vana 123
    0x1b, /* 0x01 - Esc */
1339 cejka 124
    '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+',
125
    SPECIAL, /* 0x0e - Backspace */
126
    '\t', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', '\n',
127
    SPECIAL, /* 0x1d - LCtrl */
128
    'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"',
129
    '~',
130
    SPECIAL, /* 0x2a - LShift */
131
    '|',
132
    'Z', 'X', 'C', 'V', 'B', 'N', 'M', '<', '>', '?',
133
    SPECIAL, /* 0x36 - RShift */
134
    '*',
135
    SPECIAL, /* 0x38 - LAlt */
136
    ' ',
137
    SPECIAL, /* 0x3a - CapsLock */
1504 cejka 138
    SPECIAL, /* 0x3b - F1 */
139
    SPECIAL, /* 0x3c - F2 */
140
    SPECIAL, /* 0x3d - F3 */
141
    SPECIAL, /* 0x3e - F4 */
142
    SPECIAL, /* 0x3f - F5 */
143
    SPECIAL, /* 0x40 - F6 */
144
    SPECIAL, /* 0x41 - F7 */
145
    SPECIAL, /* 0x42 - F8 */
146
    SPECIAL, /* 0x43 - F9 */
147
    SPECIAL, /* 0x44 - F10 */
1339 cejka 148
    SPECIAL, /* 0x45 - NumLock */
149
    SPECIAL, /* 0x46 - ScrollLock */
150
    '7', '8', '9', '-',
151
    '4', '5', '6', '+',
152
    '1', '2', '3',
153
    '0', '.',
154
    SPECIAL, /* 0x54 - Alt-SysRq */
155
    SPECIAL, /* 0x55 - F11/F12/PF1/FN */
156
    SPECIAL, /* 0x56 - unlabelled key next to LAlt */
157
    SPECIAL, /* 0x57 - F11 */
158
    SPECIAL, /* 0x58 - F12 */
159
    SPECIAL, /* 0x59 */
160
    SPECIAL, /* 0x5a */
161
    SPECIAL, /* 0x5b */
162
    SPECIAL, /* 0x5c */
163
    SPECIAL, /* 0x5d */
164
    SPECIAL, /* 0x5e */
165
    SPECIAL, /* 0x5f */
166
    SPECIAL, /* 0x60 */
167
    SPECIAL, /* 0x61 */
168
    SPECIAL, /* 0x62 */
169
    SPECIAL, /* 0x63 */
170
    SPECIAL, /* 0x64 */
171
    SPECIAL, /* 0x65 */
172
    SPECIAL, /* 0x66 */
173
    SPECIAL, /* 0x67 */
174
    SPECIAL, /* 0x68 */
175
    SPECIAL, /* 0x69 */
176
    SPECIAL, /* 0x6a */
177
    SPECIAL, /* 0x6b */
178
    SPECIAL, /* 0x6c */
179
    SPECIAL, /* 0x6d */
180
    SPECIAL, /* 0x6e */
181
    SPECIAL, /* 0x6f */
182
    SPECIAL, /* 0x70 */
183
    SPECIAL, /* 0x71 */
184
    SPECIAL, /* 0x72 */
185
    SPECIAL, /* 0x73 */
186
    SPECIAL, /* 0x74 */
187
    SPECIAL, /* 0x75 */
188
    SPECIAL, /* 0x76 */
189
    SPECIAL, /* 0x77 */
190
    SPECIAL, /* 0x78 */
191
    SPECIAL, /* 0x79 */
192
    SPECIAL, /* 0x7a */
193
    SPECIAL, /* 0x7b */
194
    SPECIAL, /* 0x7c */
195
    SPECIAL, /* 0x7d */
196
    SPECIAL, /* 0x7e */
197
    SPECIAL, /* 0x7f */
198
};
199
 
1649 cejka 200
/**
201
 * @}
202
 */