source: mainline/kernel/genarch/src/kbrd/scanc_at.c@ d1582b50

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since d1582b50 was d1582b50, checked in by Jiri Svoboda <jiri@…>, 5 years ago

Fix spacing in single-line comments using latest ccheck

This found incorrectly formatted section comments (with blocks of
asterisks or dashes). I strongly believe against using section comments
but I am not simply removing them since that would probably be
controversial.

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