VirtualBox

source: vbox/trunk/src/VBox/Frontends/Common/VBoxKeyboard/xkbtoscan.h@ 67954

Last change on this file since 67954 was 52048, checked in by vboxsync, 10 years ago

FE/Common/VBoxKeyboard: use XKB on X11 hosts to match all keys on the keyboard, not just the layout-dependent ones, to fix Brazillian Thinkpad keyboards.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.1 KB
Line 
1/* $Id: xkbtoscan.h 52048 2014-07-16 13:02:24Z vboxsync $ */
2/** @file
3 * VBox/Frontends/Common - X11 keyboard driver translation tables (XT scan
4 * code mappings for XKB key names).
5 */
6
7/*
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 */
22
23/*
24 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
25 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
26 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
27 * a choice of LGPL license versions is made available with the language indicating
28 * that LGPLv2 or any later version may be used, or where a choice of which version
29 * of the LGPL is applied is otherwise unspecified.
30 */
31
32#ifndef ___VBox_keyboard_tables_h
33# error This file must be included from within keyboard-tables.h
34#endif /* ___VBox_keyboard_tables_h */
35
36enum { XKB_NAME_SIZE = 4 };
37
38/**
39 * This table contains a list of mappings of XKB key names to XT scan codes.
40 */
41struct
42{
43 const char cszName[XKB_NAME_SIZE];
44 unsigned uScan;
45} xkbMap[] =
46{
47 { "ESC", 0x1 },
48 { "AE01", 0x2 },
49 { "AE02", 0x3 },
50 { "AE03", 0x4 },
51 { "AE04", 0x5 },
52 { "AE05", 0x6 },
53 { "AE06", 0x7 },
54 { "AE07", 0x8 },
55 { "AE08", 0x9 },
56 { "AE09", 0xa },
57 { "AE10", 0xb },
58 { "AE11", 0xc },
59 { "AE12", 0xd },
60 { "BKSP", 0xe },
61 { "TAB", 0xf },
62 { "AD01", 0x10 },
63 { "AD02", 0x11 },
64 { "AD03", 0x12 },
65 { "AD04", 0x13 },
66 { "AD05", 0x14 },
67 { "AD06", 0x15 },
68 { "AD07", 0x16 },
69 { "AD08", 0x17 },
70 { "AD09", 0x18 },
71 { "AD10", 0x19 },
72 { "AD11", 0x1a },
73 { "AD12", 0x1b },
74 { "RTRN", 0x1c },
75 { "LCTL", 0x1d },
76 { "AC01", 0x1e },
77 { "AC02", 0x1f },
78 { "AC03", 0x20 },
79 { "AC04", 0x21 },
80 { "AC05", 0x22 },
81 { "AC06", 0x23 },
82 { "AC07", 0x24 },
83 { "AC08", 0x25 },
84 { "AC09", 0x26 },
85 { "AC10", 0x27 },
86 { "AC11", 0x28 },
87 { "AC12", 0x2b },
88 { "TLDE", 0x29 },
89 { "LFSH", 0x2a },
90 { "BKSL", 0x2b },
91 { "AB01", 0x2c },
92 { "AB02", 0x2d },
93 { "AB03", 0x2e },
94 { "AB04", 0x2f },
95 { "AB05", 0x30 },
96 { "AB06", 0x31 },
97 { "AB07", 0x32 },
98 { "AB08", 0x33 },
99 { "AB09", 0x34 },
100 { "AB10", 0x35 },
101 { "RTSH", 0x36 },
102 { "KPMU", 0x37 },
103 { "LALT", 0x38 },
104 { "SPCE", 0x39 },
105 { "CAPS", 0x3a },
106 { "FK01", 0x3b },
107 { "FK02", 0x3c },
108 { "FK03", 0x3d },
109 { "FK04", 0x3e },
110 { "FK05", 0x3f },
111 { "FK06", 0x40 },
112 { "FK07", 0x41 },
113 { "FK08", 0x42 },
114 { "FK09", 0x43 },
115 { "FK10", 0x44 },
116 { "NMLK", 0x145 },
117 { "SCLK", 0x46 },
118 { "KP7", 0x47 },
119 { "KP8", 0x48 },
120 { "KP9", 0x49 },
121 { "KPSU", 0x4a },
122 { "KP4", 0x4b },
123 { "KP5", 0x4c },
124 { "KP6", 0x4d },
125 { "KPAD", 0x4e },
126 { "KP1", 0x4f },
127 { "KP2", 0x50 },
128 { "KP3", 0x51 },
129 { "KP0", 0x52 },
130 { "KPDL", 0x53 },
131 { "KPPT", 0x7e },
132 { "LVL3", 0x138 },
133 { "LSGT", 0x56 },
134 { "FK11", 0x57 },
135 { "FK12", 0x58 },
136 { "AB11", 0x73 },
137 { "KATA", 0x0 },
138 { "HIRA", 0x0 },
139 { "HENK", 0x79 },
140 { "HKTG", 0x70 },
141 { "MUHE", 0x7b },
142 { "HZTG", 0x29 },
143 { "JPCM", 0x0 },
144 { "KPEN", 0x11c },
145 { "RCTL", 0x11d },
146 { "KPDV", 0x135 },
147 { "PRSC", 0x137 },
148 { "RALT", 0x138 },
149 { "ALGR", 0x138 },
150 { "LNFD", 0x0 },
151 { "HOME", 0x147 },
152 { "UP", 0x148 },
153 { "PGUP", 0x149 },
154 { "LEFT", 0x14b },
155 { "RGHT", 0x14d },
156 { "END", 0x14f },
157 { "DOWN", 0x150 },
158 { "PGDN", 0x151 },
159 { "INS", 0x152 },
160 { "DELE", 0x153 },
161 { "I120", 0x0 },
162 { "MUTE", 0x120 },
163 { "VOL-", 0x12e },
164 { "VOL+", 0x130 },
165 { "POWR", 0x15e },
166 { "KPEQ", 0x0 },
167 { "I126", 0x0 },
168 { "PAUS", 0x45 },
169 { "I128", 0x0 },
170 { "I129", 0x7e },
171 { "KPPT", 0x7e },
172 { "HNGL", 0xf2 },
173 { "HJCV", 0xf1 },
174 { "AE13", 0x7d },
175 { "LWIN", 0x15b },
176 { "LMTA", 0x15b },
177 { "RWIN", 0x15c },
178 { "RMTA", 0x15c },
179 { "COMP", 0x15d },
180 { "MENU", 0x15d },
181 { "STOP", 0x168 },
182 { "AGAI", 0x105 },
183 { "PROP", 0x106 },
184 { "UNDO", 0x107 },
185 { "FRNT", 0x10c },
186 { "COPY", 0x118 },
187 { "OPEN", 0x65 },
188 { "PAST", 0x10a },
189 { "FIND", 0x110 },
190 { "CUT", 0x117 },
191 { "HELP", 0x175 },
192 { "I147", 0x0 },
193 { "I148", 0x0 },
194 { "I149", 0x0 },
195 { "I150", 0x15f },
196 { "I151", 0x163 },
197 { "I152", 0x0 },
198 { "I153", 0x119 },
199 { "I154", 0x0 },
200 { "I155", 0x0 },
201 { "I156", 0x0 },
202 { "I157", 0x0 },
203 { "I158", 0x0 },
204 { "I159", 0x0 },
205 { "I160", 0x120 },
206 { "I161", 0x0 },
207 { "I162", 0x122 },
208 { "I163", 0x16c },
209 { "I164", 0x124 },
210 { "I165", 0x15f },
211 { "I166", 0x16a },
212 { "I167", 0x169 },
213 { "I168", 0x0 },
214 { "I169", 0x0 },
215 { "I170", 0x0 },
216 { "I171", 0x119 },
217 { "I172", 0x122 },
218 { "I173", 0x110 },
219 { "I174", 0x12e },
220 { "I175", 0x0 },
221 { "I176", 0x130 },
222 { "I177", 0x0 },
223 { "I178", 0x0 },
224 { "I179", 0x0 },
225 { "I180", 0x132 },
226 { "I181", 0x167 },
227 { "I182", 0x140 },
228 { "I183", 0x0 },
229 { "I184", 0x0 },
230 { "I185", 0x10b },
231 { "I186", 0x18b },
232 { "I187", 0x0 },
233 { "I188", 0x0 },
234 { "I189", 0x0 },
235 { "I190", 0x105 },
236 { "FK13", 0x0 },
237 { "FK14", 0x0 },
238 { "FK15", 0x0 },
239 { "FK16", 0x0 },
240 { "FK17", 0x0 },
241 { "FK18", 0x0 },
242 { "FK19", 0x0 },
243 { "FK20", 0x0 },
244 { "FK21", 0x0 },
245 { "FK22", 0x0 },
246 { "FK23", 0x0 },
247 { "FK24", 0x0 },
248 { "MDSW", 0x138 },
249 { "ALT", 0x0 },
250 { "META", 0x0 },
251 { "SUPR", 0x0 },
252 { "HYPR", 0x0 },
253 { "I208", 0x122 },
254 { "I209", 0x122 },
255 { "I210", 0x0 },
256 { "I211", 0x0 },
257 { "I212", 0x0 },
258 { "I213", 0x0 },
259 { "I214", 0x140 },
260 { "I215", 0x122 },
261 { "I216", 0x169 },
262 { "I217", 0x0 },
263 { "I218", 0x137 },
264 { "I219", 0x0 },
265 { "I220", 0x0 },
266 { "I221", 0x0 },
267 { "I222", 0x0 },
268 { "I223", 0x0 },
269 { "I224", 0x0 },
270 { "I225", 0x165 },
271 { "I226", 0x0 },
272 { "I227", 0x0 },
273 { "I228", 0x0 },
274 { "I229", 0x165 },
275 { "I230", 0x166 },
276 { "I231", 0x167 },
277 { "I232", 0x168 },
278 { "I233", 0x169 },
279 { "I234", 0x16a },
280 { "I235", 0x16b },
281 { "I236", 0x16c },
282 { "I237", 0x16d },
283 { "I238", 0x0 },
284 { "I239", 0x143 },
285 { "I240", 0x141 },
286 { "I241", 0x0 },
287 { "I242", 0x157 },
288 { "I243", 0x105 },
289 { "I244", 0x0 },
290 { "I245", 0x0 },
291 { "I246", 0x0 },
292 { "I247", 0x0 },
293 { "I248", 0x0 },
294 { "I249", 0x0 },
295 { "I250", 0x0 },
296 { "I251", 0x0 },
297 { "I252", 0x0 },
298 { "I253", 0x0 }
299};
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette