Rev 2071 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | jermar | 1 | /* |
2071 | jermar | 2 | * Copyright (c) 2006 Jakub Jermar |
1 | jermar | 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, 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 | |||
1754 | jermar | 29 | /** @addtogroup genarch |
1702 | cejka | 30 | * @{ |
31 | */ |
||
1754 | jermar | 32 | /** |
1757 | jermar | 33 | * @file |
1838 | jermar | 34 | * @brief Scan codes for pc keyboards. |
1702 | cejka | 35 | */ |
36 | |||
1842 | jermar | 37 | #include <genarch/kbd/scanc.h> |
1 | jermar | 38 | |
508 | jermar | 39 | /** Primary meaning of scancodes. */ |
1838 | jermar | 40 | char sc_primary_map[] = { |
508 | jermar | 41 | SPECIAL, /* 0x00 */ |
42 | SPECIAL, /* 0x01 - Esc */ |
||
43 | '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', |
||
588 | palkovsky | 44 | '\b', /* 0x0e - Backspace */ |
508 | jermar | 45 | '\t', 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\n', |
46 | SPECIAL, /* 0x1d - LCtrl */ |
||
47 | 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', |
||
48 | '`', |
||
49 | SPECIAL, /* 0x2a - LShift */ |
||
50 | '\\', |
||
51 | 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', |
||
52 | SPECIAL, /* 0x36 - RShift */ |
||
53 | '*', |
||
54 | SPECIAL, /* 0x38 - LAlt */ |
||
55 | ' ', |
||
56 | SPECIAL, /* 0x3a - CapsLock */ |
||
57 | SPECIAL, /* 0x3b - F1 */ |
||
58 | SPECIAL, /* 0x3c - F2 */ |
||
59 | SPECIAL, /* 0x3d - F3 */ |
||
60 | SPECIAL, /* 0x3e - F4 */ |
||
61 | SPECIAL, /* 0x3f - F5 */ |
||
62 | SPECIAL, /* 0x40 - F6 */ |
||
63 | SPECIAL, /* 0x41 - F7 */ |
||
64 | SPECIAL, /* 0x42 - F8 */ |
||
65 | SPECIAL, /* 0x43 - F9 */ |
||
66 | SPECIAL, /* 0x44 - F10 */ |
||
67 | SPECIAL, /* 0x45 - NumLock */ |
||
68 | SPECIAL, /* 0x46 - ScrollLock */ |
||
69 | '7', '8', '9', '-', |
||
70 | '4', '5', '6', '+', |
||
71 | '1', '2', '3', |
||
72 | '0', '.', |
||
73 | SPECIAL, /* 0x54 - Alt-SysRq */ |
||
74 | SPECIAL, /* 0x55 - F11/F12/PF1/FN */ |
||
75 | SPECIAL, /* 0x56 - unlabelled key next to LAlt */ |
||
76 | SPECIAL, /* 0x57 - F11 */ |
||
77 | SPECIAL, /* 0x58 - F12 */ |
||
78 | SPECIAL, /* 0x59 */ |
||
79 | SPECIAL, /* 0x5a */ |
||
80 | SPECIAL, /* 0x5b */ |
||
81 | SPECIAL, /* 0x5c */ |
||
82 | SPECIAL, /* 0x5d */ |
||
83 | SPECIAL, /* 0x5e */ |
||
84 | SPECIAL, /* 0x5f */ |
||
85 | SPECIAL, /* 0x60 */ |
||
86 | SPECIAL, /* 0x61 */ |
||
87 | SPECIAL, /* 0x62 */ |
||
88 | SPECIAL, /* 0x63 */ |
||
89 | SPECIAL, /* 0x64 */ |
||
90 | SPECIAL, /* 0x65 */ |
||
91 | SPECIAL, /* 0x66 */ |
||
92 | SPECIAL, /* 0x67 */ |
||
93 | SPECIAL, /* 0x68 */ |
||
94 | SPECIAL, /* 0x69 */ |
||
95 | SPECIAL, /* 0x6a */ |
||
96 | SPECIAL, /* 0x6b */ |
||
97 | SPECIAL, /* 0x6c */ |
||
98 | SPECIAL, /* 0x6d */ |
||
99 | SPECIAL, /* 0x6e */ |
||
100 | SPECIAL, /* 0x6f */ |
||
101 | SPECIAL, /* 0x70 */ |
||
102 | SPECIAL, /* 0x71 */ |
||
103 | SPECIAL, /* 0x72 */ |
||
104 | SPECIAL, /* 0x73 */ |
||
105 | SPECIAL, /* 0x74 */ |
||
106 | SPECIAL, /* 0x75 */ |
||
107 | SPECIAL, /* 0x76 */ |
||
108 | SPECIAL, /* 0x77 */ |
||
109 | SPECIAL, /* 0x78 */ |
||
110 | SPECIAL, /* 0x79 */ |
||
111 | SPECIAL, /* 0x7a */ |
||
112 | SPECIAL, /* 0x7b */ |
||
113 | SPECIAL, /* 0x7c */ |
||
114 | SPECIAL, /* 0x7d */ |
||
115 | SPECIAL, /* 0x7e */ |
||
116 | SPECIAL, /* 0x7f */ |
||
117 | }; |
||
118 | |||
119 | /** Secondary meaning of scancodes. */ |
||
1838 | jermar | 120 | char sc_secondary_map[] = { |
508 | jermar | 121 | SPECIAL, /* 0x00 */ |
122 | SPECIAL, /* 0x01 - Esc */ |
||
123 | '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', |
||
124 | SPECIAL, /* 0x0e - Backspace */ |
||
125 | '\t', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', '\n', |
||
126 | SPECIAL, /* 0x1d - LCtrl */ |
||
127 | 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', |
||
128 | '~', |
||
129 | SPECIAL, /* 0x2a - LShift */ |
||
130 | '|', |
||
131 | 'Z', 'X', 'C', 'V', 'B', 'N', 'M', '<', '>', '?', |
||
132 | SPECIAL, /* 0x36 - RShift */ |
||
133 | '*', |
||
134 | SPECIAL, /* 0x38 - LAlt */ |
||
135 | ' ', |
||
136 | SPECIAL, /* 0x3a - CapsLock */ |
||
137 | SPECIAL, /* 0x3b - F1 */ |
||
138 | SPECIAL, /* 0x3c - F2 */ |
||
139 | SPECIAL, /* 0x3d - F3 */ |
||
140 | SPECIAL, /* 0x3e - F4 */ |
||
141 | SPECIAL, /* 0x3f - F5 */ |
||
142 | SPECIAL, /* 0x40 - F6 */ |
||
143 | SPECIAL, /* 0x41 - F7 */ |
||
144 | SPECIAL, /* 0x42 - F8 */ |
||
145 | SPECIAL, /* 0x43 - F9 */ |
||
146 | SPECIAL, /* 0x44 - F10 */ |
||
147 | SPECIAL, /* 0x45 - NumLock */ |
||
148 | SPECIAL, /* 0x46 - ScrollLock */ |
||
149 | '7', '8', '9', '-', |
||
150 | '4', '5', '6', '+', |
||
151 | '1', '2', '3', |
||
152 | '0', '.', |
||
153 | SPECIAL, /* 0x54 - Alt-SysRq */ |
||
154 | SPECIAL, /* 0x55 - F11/F12/PF1/FN */ |
||
155 | SPECIAL, /* 0x56 - unlabelled key next to LAlt */ |
||
156 | SPECIAL, /* 0x57 - F11 */ |
||
157 | SPECIAL, /* 0x58 - F12 */ |
||
158 | SPECIAL, /* 0x59 */ |
||
159 | SPECIAL, /* 0x5a */ |
||
160 | SPECIAL, /* 0x5b */ |
||
161 | SPECIAL, /* 0x5c */ |
||
162 | SPECIAL, /* 0x5d */ |
||
163 | SPECIAL, /* 0x5e */ |
||
164 | SPECIAL, /* 0x5f */ |
||
165 | SPECIAL, /* 0x60 */ |
||
166 | SPECIAL, /* 0x61 */ |
||
167 | SPECIAL, /* 0x62 */ |
||
168 | SPECIAL, /* 0x63 */ |
||
169 | SPECIAL, /* 0x64 */ |
||
170 | SPECIAL, /* 0x65 */ |
||
171 | SPECIAL, /* 0x66 */ |
||
172 | SPECIAL, /* 0x67 */ |
||
173 | SPECIAL, /* 0x68 */ |
||
174 | SPECIAL, /* 0x69 */ |
||
175 | SPECIAL, /* 0x6a */ |
||
176 | SPECIAL, /* 0x6b */ |
||
177 | SPECIAL, /* 0x6c */ |
||
178 | SPECIAL, /* 0x6d */ |
||
179 | SPECIAL, /* 0x6e */ |
||
180 | SPECIAL, /* 0x6f */ |
||
181 | SPECIAL, /* 0x70 */ |
||
182 | SPECIAL, /* 0x71 */ |
||
183 | SPECIAL, /* 0x72 */ |
||
184 | SPECIAL, /* 0x73 */ |
||
185 | SPECIAL, /* 0x74 */ |
||
186 | SPECIAL, /* 0x75 */ |
||
187 | SPECIAL, /* 0x76 */ |
||
188 | SPECIAL, /* 0x77 */ |
||
189 | SPECIAL, /* 0x78 */ |
||
190 | SPECIAL, /* 0x79 */ |
||
191 | SPECIAL, /* 0x7a */ |
||
192 | SPECIAL, /* 0x7b */ |
||
193 | SPECIAL, /* 0x7c */ |
||
194 | SPECIAL, /* 0x7d */ |
||
195 | SPECIAL, /* 0x7e */ |
||
196 | SPECIAL, /* 0x7f */ |
||
197 | }; |
||
198 | |||
1754 | jermar | 199 | /** @} |
1702 | cejka | 200 | */ |