summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/src/core/linux
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/SDL-3.2.8/src/core/linux')
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_dbus.c641
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_dbus.h114
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_evdev.c1042
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_evdev.h41
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_evdev_capabilities.c168
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_evdev_capabilities.h76
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd.c997
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd.h35
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd_default_accents.h282
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd_default_keymap.h4765
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_fcitx.c460
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_fcitx.h35
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_ibus.c743
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_ibus.h55
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_ime.c150
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_ime.h35
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_system_theme.c156
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_system_theme.h30
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_threadprio.c345
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_udev.c596
-rw-r--r--contrib/SDL-3.2.8/src/core/linux/SDL_udev.h113
21 files changed, 10879 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_dbus.c b/contrib/SDL-3.2.8/src/core/linux/SDL_dbus.c
new file mode 100644
index 0000000..9a2fc1e
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_dbus.c
@@ -0,0 +1,641 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22#include "SDL_dbus.h"
23#include "../../stdlib/SDL_vacopy.h"
24
25#ifdef SDL_USE_LIBDBUS
26// we never link directly to libdbus.
27static const char *dbus_library = "libdbus-1.so.3";
28static SDL_SharedObject *dbus_handle = NULL;
29static char *inhibit_handle = NULL;
30static unsigned int screensaver_cookie = 0;
31static SDL_DBusContext dbus;
32
33static bool LoadDBUSSyms(void)
34{
35#define SDL_DBUS_SYM2_OPTIONAL(TYPE, x, y) \
36 dbus.x = (TYPE)SDL_LoadFunction(dbus_handle, #y)
37
38#define SDL_DBUS_SYM2(TYPE, x, y) \
39 if (!(dbus.x = (TYPE)SDL_LoadFunction(dbus_handle, #y))) \
40 return false
41
42#define SDL_DBUS_SYM_OPTIONAL(TYPE, x) \
43 SDL_DBUS_SYM2_OPTIONAL(TYPE, x, dbus_##x)
44
45#define SDL_DBUS_SYM(TYPE, x) \
46 SDL_DBUS_SYM2(TYPE, x, dbus_##x)
47
48 SDL_DBUS_SYM(DBusConnection *(*)(DBusBusType, DBusError *), bus_get_private);
49 SDL_DBUS_SYM(dbus_bool_t (*)(DBusConnection *, DBusError *), bus_register);
50 SDL_DBUS_SYM(void (*)(DBusConnection *, const char *, DBusError *), bus_add_match);
51 SDL_DBUS_SYM(DBusConnection *(*)(const char *, DBusError *), connection_open_private);
52 SDL_DBUS_SYM(void (*)(DBusConnection *, dbus_bool_t), connection_set_exit_on_disconnect);
53 SDL_DBUS_SYM(dbus_bool_t (*)(DBusConnection *), connection_get_is_connected);
54 SDL_DBUS_SYM(dbus_bool_t (*)(DBusConnection *, DBusHandleMessageFunction, void *, DBusFreeFunction), connection_add_filter);
55 SDL_DBUS_SYM(dbus_bool_t (*)(DBusConnection *, DBusHandleMessageFunction, void *), connection_remove_filter);
56 SDL_DBUS_SYM(dbus_bool_t (*)(DBusConnection *, const char *, const DBusObjectPathVTable *, void *, DBusError *), connection_try_register_object_path);
57 SDL_DBUS_SYM(dbus_bool_t (*)(DBusConnection *, DBusMessage *, dbus_uint32_t *), connection_send);
58 SDL_DBUS_SYM(DBusMessage *(*)(DBusConnection *, DBusMessage *, int, DBusError *), connection_send_with_reply_and_block);
59 SDL_DBUS_SYM(void (*)(DBusConnection *), connection_close);
60 SDL_DBUS_SYM(void (*)(DBusConnection *), connection_ref);
61 SDL_DBUS_SYM(void (*)(DBusConnection *), connection_unref);
62 SDL_DBUS_SYM(void (*)(DBusConnection *), connection_flush);
63 SDL_DBUS_SYM(dbus_bool_t (*)(DBusConnection *, int), connection_read_write);
64 SDL_DBUS_SYM(DBusDispatchStatus (*)(DBusConnection *), connection_dispatch);
65 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessage *, const char *, const char *), message_is_signal);
66 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessage *, const char *), message_has_path);
67 SDL_DBUS_SYM(DBusMessage *(*)(const char *, const char *, const char *, const char *), message_new_method_call);
68 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessage *, int, ...), message_append_args);
69 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessage *, int, va_list), message_append_args_valist);
70 SDL_DBUS_SYM(void (*)(DBusMessage *, DBusMessageIter *), message_iter_init_append);
71 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessageIter *, int, const char *, DBusMessageIter *), message_iter_open_container);
72 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessageIter *, int, const void *), message_iter_append_basic);
73 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessageIter *, DBusMessageIter *), message_iter_close_container);
74 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessage *, DBusError *, int, ...), message_get_args);
75 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessage *, DBusError *, int, va_list), message_get_args_valist);
76 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessage *, DBusMessageIter *), message_iter_init);
77 SDL_DBUS_SYM(dbus_bool_t (*)(DBusMessageIter *), message_iter_next);
78 SDL_DBUS_SYM(void (*)(DBusMessageIter *, void *), message_iter_get_basic);
79 SDL_DBUS_SYM(int (*)(DBusMessageIter *), message_iter_get_arg_type);
80 SDL_DBUS_SYM(void (*)(DBusMessageIter *, DBusMessageIter *), message_iter_recurse);
81 SDL_DBUS_SYM(void (*)(DBusMessage *), message_unref);
82 SDL_DBUS_SYM(dbus_bool_t (*)(void), threads_init_default);
83 SDL_DBUS_SYM(void (*)(DBusError *), error_init);
84 SDL_DBUS_SYM(dbus_bool_t (*)(const DBusError *), error_is_set);
85 SDL_DBUS_SYM(void (*)(DBusError *), error_free);
86 SDL_DBUS_SYM(char *(*)(void), get_local_machine_id);
87 SDL_DBUS_SYM_OPTIONAL(char *(*)(DBusError *), try_get_local_machine_id);
88 SDL_DBUS_SYM(void (*)(void *), free);
89 SDL_DBUS_SYM(void (*)(char **), free_string_array);
90 SDL_DBUS_SYM(void (*)(void), shutdown);
91
92#undef SDL_DBUS_SYM
93#undef SDL_DBUS_SYM2
94
95 return true;
96}
97
98static void UnloadDBUSLibrary(void)
99{
100 if (dbus_handle) {
101 SDL_UnloadObject(dbus_handle);
102 dbus_handle = NULL;
103 }
104}
105
106static bool LoadDBUSLibrary(void)
107{
108 bool result = true;
109 if (!dbus_handle) {
110 dbus_handle = SDL_LoadObject(dbus_library);
111 if (!dbus_handle) {
112 result = false;
113 // Don't call SDL_SetError(): SDL_LoadObject already did.
114 } else {
115 result = LoadDBUSSyms();
116 if (!result) {
117 UnloadDBUSLibrary();
118 }
119 }
120 }
121 return result;
122}
123
124static SDL_InitState dbus_init;
125
126void SDL_DBus_Init(void)
127{
128 static bool is_dbus_available = true;
129
130 if (!is_dbus_available) {
131 return; // don't keep trying if this fails.
132 }
133
134 if (!SDL_ShouldInit(&dbus_init)) {
135 return;
136 }
137
138 if (!LoadDBUSLibrary()) {
139 goto error;
140 }
141
142 if (!dbus.threads_init_default()) {
143 goto error;
144 }
145
146 DBusError err;
147 dbus.error_init(&err);
148 // session bus is required
149
150 dbus.session_conn = dbus.bus_get_private(DBUS_BUS_SESSION, &err);
151 if (dbus.error_is_set(&err)) {
152 dbus.error_free(&err);
153 goto error;
154 }
155 dbus.connection_set_exit_on_disconnect(dbus.session_conn, 0);
156
157 // system bus is optional
158 dbus.system_conn = dbus.bus_get_private(DBUS_BUS_SYSTEM, &err);
159 if (!dbus.error_is_set(&err)) {
160 dbus.connection_set_exit_on_disconnect(dbus.system_conn, 0);
161 }
162
163 dbus.error_free(&err);
164 SDL_SetInitialized(&dbus_init, true);
165 return;
166
167error:
168 is_dbus_available = false;
169 SDL_SetInitialized(&dbus_init, true);
170 SDL_DBus_Quit();
171}
172
173void SDL_DBus_Quit(void)
174{
175 if (!SDL_ShouldQuit(&dbus_init)) {
176 return;
177 }
178
179 if (dbus.system_conn) {
180 dbus.connection_close(dbus.system_conn);
181 dbus.connection_unref(dbus.system_conn);
182 }
183 if (dbus.session_conn) {
184 dbus.connection_close(dbus.session_conn);
185 dbus.connection_unref(dbus.session_conn);
186 }
187
188 if (SDL_GetHintBoolean(SDL_HINT_SHUTDOWN_DBUS_ON_QUIT, false)) {
189 if (dbus.shutdown) {
190 dbus.shutdown();
191 }
192
193 UnloadDBUSLibrary();
194 } else {
195 /* Leaving libdbus loaded when skipping dbus_shutdown() avoids
196 * spurious leak warnings from LeakSanitizer on internal D-Bus
197 * allocations that would be freed by dbus_shutdown(). */
198 dbus_handle = NULL;
199 }
200
201 SDL_zero(dbus);
202 if (inhibit_handle) {
203 SDL_free(inhibit_handle);
204 inhibit_handle = NULL;
205 }
206
207 SDL_SetInitialized(&dbus_init, false);
208}
209
210SDL_DBusContext *SDL_DBus_GetContext(void)
211{
212 if (!dbus_handle || !dbus.session_conn) {
213 SDL_DBus_Init();
214 }
215
216 return (dbus_handle && dbus.session_conn) ? &dbus : NULL;
217}
218
219static bool SDL_DBus_CallMethodInternal(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, va_list ap)
220{
221 bool result = false;
222
223 if (conn) {
224 DBusMessage *msg = dbus.message_new_method_call(node, path, interface, method);
225 if (msg) {
226 int firstarg;
227 va_list ap_reply;
228 va_copy(ap_reply, ap); // copy the arg list so we don't compete with D-Bus for it
229 firstarg = va_arg(ap, int);
230 if ((firstarg == DBUS_TYPE_INVALID) || dbus.message_append_args_valist(msg, firstarg, ap)) {
231 DBusMessage *reply = dbus.connection_send_with_reply_and_block(conn, msg, 300, NULL);
232 if (reply) {
233 // skip any input args, get to output args.
234 while ((firstarg = va_arg(ap_reply, int)) != DBUS_TYPE_INVALID) {
235 // we assume D-Bus already validated all this.
236 {
237 void *dumpptr = va_arg(ap_reply, void *);
238 (void)dumpptr;
239 }
240 if (firstarg == DBUS_TYPE_ARRAY) {
241 {
242 const int dumpint = va_arg(ap_reply, int);
243 (void)dumpint;
244 }
245 }
246 }
247 firstarg = va_arg(ap_reply, int);
248 if ((firstarg == DBUS_TYPE_INVALID) || dbus.message_get_args_valist(reply, NULL, firstarg, ap_reply)) {
249 result = true;
250 }
251 dbus.message_unref(reply);
252 }
253 }
254 va_end(ap_reply);
255 dbus.message_unref(msg);
256 }
257 }
258
259 return result;
260}
261
262bool SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...)
263{
264 bool result;
265 va_list ap;
266 va_start(ap, method);
267 result = SDL_DBus_CallMethodInternal(conn, node, path, interface, method, ap);
268 va_end(ap);
269 return result;
270}
271
272bool SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, const char *method, ...)
273{
274 bool result;
275 va_list ap;
276 va_start(ap, method);
277 result = SDL_DBus_CallMethodInternal(dbus.session_conn, node, path, interface, method, ap);
278 va_end(ap);
279 return result;
280}
281
282static bool SDL_DBus_CallVoidMethodInternal(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, va_list ap)
283{
284 bool result = false;
285
286 if (conn) {
287 DBusMessage *msg = dbus.message_new_method_call(node, path, interface, method);
288 if (msg) {
289 int firstarg = va_arg(ap, int);
290 if ((firstarg == DBUS_TYPE_INVALID) || dbus.message_append_args_valist(msg, firstarg, ap)) {
291 if (dbus.connection_send(conn, msg, NULL)) {
292 dbus.connection_flush(conn);
293 result = true;
294 }
295 }
296
297 dbus.message_unref(msg);
298 }
299 }
300
301 return result;
302}
303
304static bool SDL_DBus_CallWithBasicReply(DBusConnection *conn, DBusMessage *msg, const int expectedtype, void *result)
305{
306 bool retval = false;
307
308 DBusMessage *reply = dbus.connection_send_with_reply_and_block(conn, msg, 300, NULL);
309 if (reply) {
310 DBusMessageIter iter, actual_iter;
311 dbus.message_iter_init(reply, &iter);
312 if (dbus.message_iter_get_arg_type(&iter) == DBUS_TYPE_VARIANT) {
313 dbus.message_iter_recurse(&iter, &actual_iter);
314 } else {
315 actual_iter = iter;
316 }
317
318 if (dbus.message_iter_get_arg_type(&actual_iter) == expectedtype) {
319 dbus.message_iter_get_basic(&actual_iter, result);
320 retval = true;
321 }
322
323 dbus.message_unref(reply);
324 }
325
326 return retval;
327}
328
329bool SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...)
330{
331 bool result;
332 va_list ap;
333 va_start(ap, method);
334 result = SDL_DBus_CallVoidMethodInternal(conn, node, path, interface, method, ap);
335 va_end(ap);
336 return result;
337}
338
339bool SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interface, const char *method, ...)
340{
341 bool result;
342 va_list ap;
343 va_start(ap, method);
344 result = SDL_DBus_CallVoidMethodInternal(dbus.session_conn, node, path, interface, method, ap);
345 va_end(ap);
346 return result;
347}
348
349bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, int expectedtype, void *result)
350{
351 bool retval = false;
352
353 if (conn) {
354 DBusMessage *msg = dbus.message_new_method_call(node, path, "org.freedesktop.DBus.Properties", "Get");
355 if (msg) {
356 if (dbus.message_append_args(msg, DBUS_TYPE_STRING, &interface, DBUS_TYPE_STRING, &property, DBUS_TYPE_INVALID)) {
357 retval = SDL_DBus_CallWithBasicReply(conn, msg, expectedtype, result);
358 }
359 dbus.message_unref(msg);
360 }
361 }
362
363 return retval;
364}
365
366bool SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, int expectedtype, void *result)
367{
368 return SDL_DBus_QueryPropertyOnConnection(dbus.session_conn, node, path, interface, property, expectedtype, result);
369}
370
371void SDL_DBus_ScreensaverTickle(void)
372{
373 if (screensaver_cookie == 0 && !inhibit_handle) { // no need to tickle if we're inhibiting.
374 // org.gnome.ScreenSaver is the legacy interface, but it'll either do nothing or just be a second harmless tickle on newer systems, so we leave it for now.
375 SDL_DBus_CallVoidMethod("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID);
376 SDL_DBus_CallVoidMethod("org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", "org.freedesktop.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID);
377 }
378}
379
380static bool SDL_DBus_AppendDictWithKeysAndValues(DBusMessageIter *iterInit, const char **keys, const char **values, int count)
381{
382 DBusMessageIter iterDict;
383
384 if (!dbus.message_iter_open_container(iterInit, DBUS_TYPE_ARRAY, "{sv}", &iterDict)) {
385 goto failed;
386 }
387
388 for (int i = 0; i < count; i++) {
389 DBusMessageIter iterEntry, iterValue;
390 const char *key = keys[i];
391 const char *value = values[i];
392
393 if (!dbus.message_iter_open_container(&iterDict, DBUS_TYPE_DICT_ENTRY, NULL, &iterEntry)) {
394 goto failed;
395 }
396
397 if (!dbus.message_iter_append_basic(&iterEntry, DBUS_TYPE_STRING, &key)) {
398 goto failed;
399 }
400
401 if (!dbus.message_iter_open_container(&iterEntry, DBUS_TYPE_VARIANT, DBUS_TYPE_STRING_AS_STRING, &iterValue)) {
402 goto failed;
403 }
404
405 if (!dbus.message_iter_append_basic(&iterValue, DBUS_TYPE_STRING, &value)) {
406 goto failed;
407 }
408
409 if (!dbus.message_iter_close_container(&iterEntry, &iterValue) || !dbus.message_iter_close_container(&iterDict, &iterEntry)) {
410 goto failed;
411 }
412 }
413
414 if (!dbus.message_iter_close_container(iterInit, &iterDict)) {
415 goto failed;
416 }
417
418 return true;
419
420failed:
421 /* message_iter_abandon_container_if_open() and message_iter_abandon_container() might be
422 * missing if libdbus is too old. Instead, we just return without cleaning up any eventual
423 * open container */
424 return false;
425}
426
427static bool SDL_DBus_AppendDictWithKeyValue(DBusMessageIter *iterInit, const char *key, const char *value)
428{
429 const char *keys[1];
430 const char *values[1];
431
432 keys[0] = key;
433 values[0] = value;
434 return SDL_DBus_AppendDictWithKeysAndValues(iterInit, keys, values, 1);
435}
436
437bool SDL_DBus_ScreensaverInhibit(bool inhibit)
438{
439 const char *default_inhibit_reason = "Playing a game";
440
441 if ((inhibit && (screensaver_cookie != 0 || inhibit_handle)) || (!inhibit && (screensaver_cookie == 0 && !inhibit_handle))) {
442 return true;
443 }
444
445 if (!dbus.session_conn) {
446 /* We either lost connection to the session bus or were not able to
447 * load the D-Bus library at all. */
448 return false;
449 }
450
451 if (SDL_GetSandbox() != SDL_SANDBOX_NONE) {
452 const char *bus_name = "org.freedesktop.portal.Desktop";
453 const char *path = "/org/freedesktop/portal/desktop";
454 const char *interface = "org.freedesktop.portal.Inhibit";
455 const char *window = ""; // As a future improvement we could gather the X11 XID or Wayland surface identifier
456 static const unsigned int INHIBIT_IDLE = 8; // Taken from the portal API reference
457 DBusMessageIter iterInit;
458
459 if (inhibit) {
460 DBusMessage *msg;
461 bool result = false;
462 const char *key = "reason";
463 const char *reply = NULL;
464 const char *reason = SDL_GetHint(SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME);
465 if (!reason || !reason[0]) {
466 reason = default_inhibit_reason;
467 }
468
469 msg = dbus.message_new_method_call(bus_name, path, interface, "Inhibit");
470 if (!msg) {
471 return false;
472 }
473
474 if (!dbus.message_append_args(msg, DBUS_TYPE_STRING, &window, DBUS_TYPE_UINT32, &INHIBIT_IDLE, DBUS_TYPE_INVALID)) {
475 dbus.message_unref(msg);
476 return false;
477 }
478
479 dbus.message_iter_init_append(msg, &iterInit);
480
481 // a{sv}
482 if (!SDL_DBus_AppendDictWithKeyValue(&iterInit, key, reason)) {
483 dbus.message_unref(msg);
484 return false;
485 }
486
487 if (SDL_DBus_CallWithBasicReply(dbus.session_conn, msg, DBUS_TYPE_OBJECT_PATH, &reply)) {
488 inhibit_handle = SDL_strdup(reply);
489 result = true;
490 }
491
492 dbus.message_unref(msg);
493 return result;
494 } else {
495 if (!SDL_DBus_CallVoidMethod(bus_name, inhibit_handle, "org.freedesktop.portal.Request", "Close", DBUS_TYPE_INVALID)) {
496 return false;
497 }
498 SDL_free(inhibit_handle);
499 inhibit_handle = NULL;
500 }
501 } else {
502 const char *bus_name = "org.freedesktop.ScreenSaver";
503 const char *path = "/org/freedesktop/ScreenSaver";
504 const char *interface = "org.freedesktop.ScreenSaver";
505
506 if (inhibit) {
507 const char *app = SDL_GetAppMetadataProperty(SDL_PROP_APP_METADATA_NAME_STRING);
508 const char *reason = SDL_GetHint(SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME);
509 if (!reason || !reason[0]) {
510 reason = default_inhibit_reason;
511 }
512
513 if (!SDL_DBus_CallMethod(bus_name, path, interface, "Inhibit",
514 DBUS_TYPE_STRING, &app, DBUS_TYPE_STRING, &reason, DBUS_TYPE_INVALID,
515 DBUS_TYPE_UINT32, &screensaver_cookie, DBUS_TYPE_INVALID)) {
516 return false;
517 }
518 return (screensaver_cookie != 0);
519 } else {
520 if (!SDL_DBus_CallVoidMethod(bus_name, path, interface, "UnInhibit", DBUS_TYPE_UINT32, &screensaver_cookie, DBUS_TYPE_INVALID)) {
521 return false;
522 }
523 screensaver_cookie = 0;
524 }
525 }
526
527 return true;
528}
529
530void SDL_DBus_PumpEvents(void)
531{
532 if (dbus.session_conn) {
533 dbus.connection_read_write(dbus.session_conn, 0);
534
535 while (dbus.connection_dispatch(dbus.session_conn) == DBUS_DISPATCH_DATA_REMAINS) {
536 // Do nothing, actual work happens in DBus_MessageFilter
537 SDL_DelayNS(SDL_US_TO_NS(10));
538 }
539 }
540}
541
542/*
543 * Get the machine ID if possible. Result must be freed with dbus->free().
544 */
545char *SDL_DBus_GetLocalMachineId(void)
546{
547 DBusError err;
548 char *result;
549
550 dbus.error_init(&err);
551
552 if (dbus.try_get_local_machine_id) {
553 // Available since dbus 1.12.0, has proper error-handling
554 result = dbus.try_get_local_machine_id(&err);
555 } else {
556 /* Available since time immemorial, but has no error-handling:
557 * if the machine ID can't be read, many versions of libdbus will
558 * treat that as a fatal mis-installation and abort() */
559 result = dbus.get_local_machine_id();
560 }
561
562 if (result) {
563 return result;
564 }
565
566 if (dbus.error_is_set(&err)) {
567 SDL_SetError("%s: %s", err.name, err.message);
568 dbus.error_free(&err);
569 } else {
570 SDL_SetError("Error getting D-Bus machine ID");
571 }
572
573 return NULL;
574}
575
576/*
577 * Convert file drops with mime type "application/vnd.portal.filetransfer" to file paths
578 * Result must be freed with dbus->free_string_array().
579 * https://flatpak.github.io/xdg-desktop-portal/#gdbus-method-org-freedesktop-portal-FileTransfer.RetrieveFiles
580 */
581char **SDL_DBus_DocumentsPortalRetrieveFiles(const char *key, int *path_count)
582{
583 DBusError err;
584 DBusMessageIter iter, iterDict;
585 char **paths = NULL;
586 DBusMessage *reply = NULL;
587 DBusMessage *msg = dbus.message_new_method_call("org.freedesktop.portal.Documents", // Node
588 "/org/freedesktop/portal/documents", // Path
589 "org.freedesktop.portal.FileTransfer", // Interface
590 "RetrieveFiles"); // Method
591
592 // Make sure we have a connection to the dbus session bus
593 if (!SDL_DBus_GetContext() || !dbus.session_conn) {
594 /* We either cannot connect to the session bus or were unable to
595 * load the D-Bus library at all. */
596 return NULL;
597 }
598
599 dbus.error_init(&err);
600
601 // First argument is a "application/vnd.portal.filetransfer" key from a DnD or clipboard event
602 if (!dbus.message_append_args(msg, DBUS_TYPE_STRING, &key, DBUS_TYPE_INVALID)) {
603 SDL_OutOfMemory();
604 dbus.message_unref(msg);
605 goto failed;
606 }
607
608 /* Second argument is a variant dictionary for options.
609 * The spec doesn't define any entries yet so it's empty. */
610 dbus.message_iter_init_append(msg, &iter);
611 if (!dbus.message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &iterDict) ||
612 !dbus.message_iter_close_container(&iter, &iterDict)) {
613 SDL_OutOfMemory();
614 dbus.message_unref(msg);
615 goto failed;
616 }
617
618 reply = dbus.connection_send_with_reply_and_block(dbus.session_conn, msg, DBUS_TIMEOUT_USE_DEFAULT, &err);
619 dbus.message_unref(msg);
620
621 if (reply) {
622 dbus.message_get_args(reply, &err, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &paths, path_count, DBUS_TYPE_INVALID);
623 dbus.message_unref(reply);
624 }
625
626 if (paths) {
627 return paths;
628 }
629
630failed:
631 if (dbus.error_is_set(&err)) {
632 SDL_SetError("%s: %s", err.name, err.message);
633 dbus.error_free(&err);
634 } else {
635 SDL_SetError("Error retrieving paths for documents portal \"%s\"", key);
636 }
637
638 return NULL;
639}
640
641#endif
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_dbus.h b/contrib/SDL-3.2.8/src/core/linux/SDL_dbus.h
new file mode 100644
index 0000000..2073d6c
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_dbus.h
@@ -0,0 +1,114 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#include "SDL_internal.h"
23
24#ifndef SDL_dbus_h_
25#define SDL_dbus_h_
26
27#ifdef HAVE_DBUS_DBUS_H
28#define SDL_USE_LIBDBUS 1
29#include <dbus/dbus.h>
30
31#ifndef DBUS_TIMEOUT_USE_DEFAULT
32#define DBUS_TIMEOUT_USE_DEFAULT -1
33#endif
34#ifndef DBUS_TIMEOUT_INFINITE
35#define DBUS_TIMEOUT_INFINITE ((int) 0x7fffffff)
36#endif
37
38typedef struct SDL_DBusContext
39{
40 DBusConnection *session_conn;
41 DBusConnection *system_conn;
42
43 DBusConnection *(*bus_get_private)(DBusBusType, DBusError *);
44 dbus_bool_t (*bus_register)(DBusConnection *, DBusError *);
45 void (*bus_add_match)(DBusConnection *, const char *, DBusError *);
46 DBusConnection *(*connection_open_private)(const char *, DBusError *);
47 void (*connection_set_exit_on_disconnect)(DBusConnection *, dbus_bool_t);
48 dbus_bool_t (*connection_get_is_connected)(DBusConnection *);
49 dbus_bool_t (*connection_add_filter)(DBusConnection *, DBusHandleMessageFunction, void *, DBusFreeFunction);
50 dbus_bool_t (*connection_remove_filter)(DBusConnection *, DBusHandleMessageFunction, void *);
51 dbus_bool_t (*connection_try_register_object_path)(DBusConnection *, const char *,
52 const DBusObjectPathVTable *, void *, DBusError *);
53 dbus_bool_t (*connection_send)(DBusConnection *, DBusMessage *, dbus_uint32_t *);
54 DBusMessage *(*connection_send_with_reply_and_block)(DBusConnection *, DBusMessage *, int, DBusError *);
55 void (*connection_close)(DBusConnection *);
56 void (*connection_ref)(DBusConnection *);
57 void (*connection_unref)(DBusConnection *);
58 void (*connection_flush)(DBusConnection *);
59 dbus_bool_t (*connection_read_write)(DBusConnection *, int);
60 DBusDispatchStatus (*connection_dispatch)(DBusConnection *);
61 dbus_bool_t (*message_is_signal)(DBusMessage *, const char *, const char *);
62 dbus_bool_t (*message_has_path)(DBusMessage *, const char *);
63 DBusMessage *(*message_new_method_call)(const char *, const char *, const char *, const char *);
64 dbus_bool_t (*message_append_args)(DBusMessage *, int, ...);
65 dbus_bool_t (*message_append_args_valist)(DBusMessage *, int, va_list);
66 void (*message_iter_init_append)(DBusMessage *, DBusMessageIter *);
67 dbus_bool_t (*message_iter_open_container)(DBusMessageIter *, int, const char *, DBusMessageIter *);
68 dbus_bool_t (*message_iter_append_basic)(DBusMessageIter *, int, const void *);
69 dbus_bool_t (*message_iter_close_container)(DBusMessageIter *, DBusMessageIter *);
70 dbus_bool_t (*message_get_args)(DBusMessage *, DBusError *, int, ...);
71 dbus_bool_t (*message_get_args_valist)(DBusMessage *, DBusError *, int, va_list);
72 dbus_bool_t (*message_iter_init)(DBusMessage *, DBusMessageIter *);
73 dbus_bool_t (*message_iter_next)(DBusMessageIter *);
74 void (*message_iter_get_basic)(DBusMessageIter *, void *);
75 int (*message_iter_get_arg_type)(DBusMessageIter *);
76 void (*message_iter_recurse)(DBusMessageIter *, DBusMessageIter *);
77 void (*message_unref)(DBusMessage *);
78 dbus_bool_t (*threads_init_default)(void);
79 void (*error_init)(DBusError *);
80 dbus_bool_t (*error_is_set)(const DBusError *);
81 void (*error_free)(DBusError *);
82 char *(*get_local_machine_id)(void);
83 char *(*try_get_local_machine_id)(DBusError *);
84 void (*free)(void *);
85 void (*free_string_array)(char **);
86 void (*shutdown)(void);
87
88} SDL_DBusContext;
89
90extern void SDL_DBus_Init(void);
91extern void SDL_DBus_Quit(void);
92extern SDL_DBusContext *SDL_DBus_GetContext(void);
93
94// These use the built-in Session connection.
95extern bool SDL_DBus_CallMethod(const char *node, const char *path, const char *interface, const char *method, ...);
96extern bool SDL_DBus_CallVoidMethod(const char *node, const char *path, const char *interface, const char *method, ...);
97extern bool SDL_DBus_QueryProperty(const char *node, const char *path, const char *interface, const char *property, int expectedtype, void *result);
98
99// These use whatever connection you like.
100extern bool SDL_DBus_CallMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...);
101extern bool SDL_DBus_CallVoidMethodOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *method, ...);
102extern bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const char *node, const char *path, const char *interface, const char *property, int expectedtype, void *result);
103
104extern void SDL_DBus_ScreensaverTickle(void);
105extern bool SDL_DBus_ScreensaverInhibit(bool inhibit);
106
107extern void SDL_DBus_PumpEvents(void);
108extern char *SDL_DBus_GetLocalMachineId(void);
109
110extern char **SDL_DBus_DocumentsPortalRetrieveFiles(const char *key, int *files_count);
111
112#endif // HAVE_DBUS_DBUS_H
113
114#endif // SDL_dbus_h_
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_evdev.c b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev.c
new file mode 100644
index 0000000..5746e2e
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev.c
@@ -0,0 +1,1042 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23#ifdef SDL_INPUT_LINUXEV
24
25// This is based on the linux joystick driver
26/* References: https://www.kernel.org/doc/Documentation/input/input.txt
27 * https://www.kernel.org/doc/Documentation/input/event-codes.txt
28 * /usr/include/linux/input.h
29 * The evtest application is also useful to debug the protocol
30 */
31
32#include "SDL_evdev.h"
33#include "SDL_evdev_kbd.h"
34
35#include <sys/stat.h>
36#include <unistd.h>
37#include <fcntl.h>
38#include <sys/ioctl.h>
39#include <linux/input.h>
40
41#include "../../events/SDL_events_c.h"
42#include "../../events/SDL_scancode_tables_c.h"
43#include "../../core/linux/SDL_evdev_capabilities.h"
44#include "../../core/linux/SDL_udev.h"
45
46// These are not defined in older Linux kernel headers
47#ifndef SYN_DROPPED
48#define SYN_DROPPED 3
49#endif
50#ifndef ABS_MT_SLOT
51#define ABS_MT_SLOT 0x2f
52#define ABS_MT_POSITION_X 0x35
53#define ABS_MT_POSITION_Y 0x36
54#define ABS_MT_TRACKING_ID 0x39
55#define ABS_MT_PRESSURE 0x3a
56#endif
57#ifndef REL_WHEEL_HI_RES
58#define REL_WHEEL_HI_RES 0x0b
59#define REL_HWHEEL_HI_RES 0x0c
60#endif
61
62// The field to look up in struct input_event for integer seconds
63#ifndef input_event_sec
64#define input_event_sec time.tv_sec
65#endif
66
67// The field to look up in struct input_event for fractional seconds
68#ifndef input_event_usec
69#define input_event_usec time.tv_usec
70#endif
71
72typedef struct SDL_evdevlist_item
73{
74 char *path;
75 int fd;
76 int udev_class;
77
78 // TODO: use this for every device, not just touchscreen
79 bool out_of_sync;
80
81 /* TODO: expand on this to have data for every possible class (mouse,
82 keyboard, touchpad, etc.). Also there's probably some things in here we
83 can pull out to the SDL_evdevlist_item i.e. name */
84 bool is_touchscreen;
85 struct
86 {
87 char *name;
88
89 int min_x, max_x, range_x;
90 int min_y, max_y, range_y;
91 int min_pressure, max_pressure, range_pressure;
92
93 int max_slots;
94 int current_slot;
95 struct
96 {
97 enum
98 {
99 EVDEV_TOUCH_SLOTDELTA_NONE = 0,
100 EVDEV_TOUCH_SLOTDELTA_DOWN,
101 EVDEV_TOUCH_SLOTDELTA_UP,
102 EVDEV_TOUCH_SLOTDELTA_MOVE
103 } delta;
104 int tracking_id;
105 int x, y, pressure;
106 } *slots;
107
108 } *touchscreen_data;
109
110 // Mouse state
111 bool high_res_wheel;
112 bool high_res_hwheel;
113 bool relative_mouse;
114 int mouse_x, mouse_y;
115 int mouse_wheel, mouse_hwheel;
116 int min_x, max_x, range_x;
117 int min_y, max_y, range_y;
118
119 struct SDL_evdevlist_item *next;
120} SDL_evdevlist_item;
121
122typedef struct SDL_EVDEV_PrivateData
123{
124 int ref_count;
125 int num_devices;
126 SDL_evdevlist_item *first;
127 SDL_evdevlist_item *last;
128 SDL_EVDEV_keyboard_state *kbd;
129} SDL_EVDEV_PrivateData;
130
131static SDL_EVDEV_PrivateData *_this = NULL;
132
133static SDL_Scancode SDL_EVDEV_translate_keycode(int keycode);
134static void SDL_EVDEV_sync_device(SDL_evdevlist_item *item);
135static bool SDL_EVDEV_device_removed(const char *dev_path);
136static bool SDL_EVDEV_device_added(const char *dev_path, int udev_class);
137#ifdef SDL_USE_LIBUDEV
138static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_event, int udev_class, const char *dev_path);
139#endif // SDL_USE_LIBUDEV
140
141static Uint8 EVDEV_MouseButtons[] = {
142 SDL_BUTTON_LEFT, // BTN_LEFT 0x110
143 SDL_BUTTON_RIGHT, // BTN_RIGHT 0x111
144 SDL_BUTTON_MIDDLE, // BTN_MIDDLE 0x112
145 SDL_BUTTON_X1, // BTN_SIDE 0x113
146 SDL_BUTTON_X2, // BTN_EXTRA 0x114
147 SDL_BUTTON_X2 + 1, // BTN_FORWARD 0x115
148 SDL_BUTTON_X2 + 2, // BTN_BACK 0x116
149 SDL_BUTTON_X2 + 3 // BTN_TASK 0x117
150};
151
152static bool SDL_EVDEV_SetRelativeMouseMode(bool enabled)
153{
154 // Mice already send relative events through this interface
155 return true;
156}
157
158static void SDL_EVDEV_UpdateKeyboardMute(void)
159{
160 if (SDL_EVDEV_GetDeviceCount(SDL_UDEV_DEVICE_KEYBOARD) > 0) {
161 SDL_EVDEV_kbd_set_muted(_this->kbd, true);
162 } else {
163 SDL_EVDEV_kbd_set_muted(_this->kbd, false);
164 }
165}
166
167bool SDL_EVDEV_Init(void)
168{
169 if (!_this) {
170 _this = (SDL_EVDEV_PrivateData *)SDL_calloc(1, sizeof(*_this));
171 if (!_this) {
172 return false;
173 }
174
175#ifdef SDL_USE_LIBUDEV
176 if (!SDL_UDEV_Init()) {
177 SDL_free(_this);
178 _this = NULL;
179 return false;
180 }
181
182 // Set up the udev callback
183 if (!SDL_UDEV_AddCallback(SDL_EVDEV_udev_callback)) {
184 SDL_UDEV_Quit();
185 SDL_free(_this);
186 _this = NULL;
187 return false;
188 }
189
190 // Force a scan to build the initial device list
191 SDL_UDEV_Scan();
192#else
193 {
194 /* Allow the user to specify a list of devices explicitly of
195 the form:
196 deviceclass:path[,deviceclass:path[,...]]
197 where device class is an integer representing the
198 SDL_UDEV_deviceclass and path is the full path to
199 the event device. */
200 const char *devices = SDL_GetHint(SDL_HINT_EVDEV_DEVICES);
201 if (devices) {
202 /* Assume this is the old use of the env var and it is not in
203 ROM. */
204 char *rest = (char *)devices;
205 char *spec;
206 while ((spec = SDL_strtok_r(rest, ",", &rest))) {
207 char *endofcls = 0;
208 long cls = SDL_strtol(spec, &endofcls, 0);
209 if (endofcls) {
210 SDL_EVDEV_device_added(endofcls + 1, cls);
211 }
212 }
213 } else {
214 // TODO: Scan the devices manually, like a caveman
215 }
216 }
217#endif // SDL_USE_LIBUDEV
218
219 _this->kbd = SDL_EVDEV_kbd_init();
220
221 SDL_EVDEV_UpdateKeyboardMute();
222 }
223
224 SDL_GetMouse()->SetRelativeMouseMode = SDL_EVDEV_SetRelativeMouseMode;
225
226 _this->ref_count += 1;
227
228 return true;
229}
230
231void SDL_EVDEV_Quit(void)
232{
233 if (!_this) {
234 return;
235 }
236
237 _this->ref_count -= 1;
238
239 if (_this->ref_count < 1) {
240#ifdef SDL_USE_LIBUDEV
241 SDL_UDEV_DelCallback(SDL_EVDEV_udev_callback);
242 SDL_UDEV_Quit();
243#endif // SDL_USE_LIBUDEV
244
245 // Remove existing devices
246 while (_this->first) {
247 SDL_EVDEV_device_removed(_this->first->path);
248 }
249
250 SDL_EVDEV_kbd_quit(_this->kbd);
251
252 SDL_assert(_this->first == NULL);
253 SDL_assert(_this->last == NULL);
254 SDL_assert(_this->num_devices == 0);
255
256 SDL_free(_this);
257 _this = NULL;
258 }
259}
260
261#ifdef SDL_USE_LIBUDEV
262static void SDL_EVDEV_udev_callback(SDL_UDEV_deviceevent udev_event, int udev_class,
263 const char *dev_path)
264{
265 if (!dev_path) {
266 return;
267 }
268
269 switch (udev_event) {
270 case SDL_UDEV_DEVICEADDED:
271 if (!(udev_class & (SDL_UDEV_DEVICE_MOUSE | SDL_UDEV_DEVICE_HAS_KEYS | SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD))) {
272 return;
273 }
274
275 if (udev_class & SDL_UDEV_DEVICE_JOYSTICK) {
276 return;
277 }
278
279 SDL_EVDEV_device_added(dev_path, udev_class);
280 break;
281 case SDL_UDEV_DEVICEREMOVED:
282 SDL_EVDEV_device_removed(dev_path);
283 break;
284 default:
285 break;
286 }
287}
288#endif // SDL_USE_LIBUDEV
289
290void SDL_EVDEV_SetVTSwitchCallbacks(void (*release_callback)(void*), void *release_callback_data,
291 void (*acquire_callback)(void*), void *acquire_callback_data)
292{
293 SDL_EVDEV_kbd_set_vt_switch_callbacks(_this->kbd,
294 release_callback, release_callback_data,
295 acquire_callback, acquire_callback_data);
296}
297
298int SDL_EVDEV_GetDeviceCount(int device_class)
299{
300 SDL_evdevlist_item *item;
301 int count = 0;
302
303 for (item = _this->first; item; item = item->next) {
304 if ((item->udev_class & device_class) == device_class) {
305 ++count;
306 }
307 }
308 return count;
309}
310
311void SDL_EVDEV_Poll(void)
312{
313 struct input_event events[32];
314 int i, j, len;
315 SDL_evdevlist_item *item;
316 SDL_Scancode scancode;
317 int mouse_button;
318 SDL_Mouse *mouse;
319 float norm_x, norm_y, norm_pressure;
320
321 if (!_this) {
322 return;
323 }
324
325#ifdef SDL_USE_LIBUDEV
326 SDL_UDEV_Poll();
327#endif
328
329 SDL_EVDEV_kbd_update(_this->kbd);
330
331 mouse = SDL_GetMouse();
332
333 for (item = _this->first; item; item = item->next) {
334 while ((len = read(item->fd, events, sizeof(events))) > 0) {
335 len /= sizeof(events[0]);
336 for (i = 0; i < len; ++i) {
337 struct input_event *event = &events[i];
338
339 /* special handling for touchscreen, that should eventually be
340 used for all devices */
341 if (item->out_of_sync && item->is_touchscreen &&
342 event->type == EV_SYN && event->code != SYN_REPORT) {
343 break;
344 }
345
346 switch (event->type) {
347 case EV_KEY:
348 if (event->code >= BTN_MOUSE && event->code < BTN_MOUSE + SDL_arraysize(EVDEV_MouseButtons)) {
349 Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
350 mouse_button = event->code - BTN_MOUSE;
351 SDL_SendMouseButton(timestamp, mouse->focus, (SDL_MouseID)item->fd, EVDEV_MouseButtons[mouse_button], (event->value != 0));
352 break;
353 }
354
355 /* BTN_TOUCH event value 1 indicates there is contact with
356 a touchscreen or trackpad (earliest finger's current
357 position is sent in EV_ABS ABS_X/ABS_Y, switching to
358 next finger after earliest is released) */
359 if (item->is_touchscreen && event->code == BTN_TOUCH) {
360 if (item->touchscreen_data->max_slots == 1) {
361 if (event->value) {
362 item->touchscreen_data->slots[0].delta = EVDEV_TOUCH_SLOTDELTA_DOWN;
363 } else {
364 item->touchscreen_data->slots[0].delta = EVDEV_TOUCH_SLOTDELTA_UP;
365 }
366 }
367 break;
368 }
369
370 // Probably keyboard
371 {
372 Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
373 scancode = SDL_EVDEV_translate_keycode(event->code);
374 if (event->value == 0) {
375 SDL_SendKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, false);
376 } else if (event->value == 1 || event->value == 2 /* key repeated */) {
377 SDL_SendKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, true);
378 }
379 SDL_EVDEV_kbd_keycode(_this->kbd, event->code, event->value);
380 }
381 break;
382 case EV_ABS:
383 switch (event->code) {
384 case ABS_MT_SLOT:
385 if (!item->is_touchscreen) { // FIXME: temp hack
386 break;
387 }
388 item->touchscreen_data->current_slot = event->value;
389 break;
390 case ABS_MT_TRACKING_ID:
391 if (!item->is_touchscreen) { // FIXME: temp hack
392 break;
393 }
394 if (event->value >= 0) {
395 item->touchscreen_data->slots[item->touchscreen_data->current_slot].tracking_id = event->value + 1;
396 item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_DOWN;
397 } else {
398 item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_UP;
399 }
400 break;
401 case ABS_MT_POSITION_X:
402 if (!item->is_touchscreen) { // FIXME: temp hack
403 break;
404 }
405 item->touchscreen_data->slots[item->touchscreen_data->current_slot].x = event->value;
406 if (item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta == EVDEV_TOUCH_SLOTDELTA_NONE) {
407 item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_MOVE;
408 }
409 break;
410 case ABS_MT_POSITION_Y:
411 if (!item->is_touchscreen) { // FIXME: temp hack
412 break;
413 }
414 item->touchscreen_data->slots[item->touchscreen_data->current_slot].y = event->value;
415 if (item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta == EVDEV_TOUCH_SLOTDELTA_NONE) {
416 item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_MOVE;
417 }
418 break;
419 case ABS_MT_PRESSURE:
420 if (!item->is_touchscreen) { // FIXME: temp hack
421 break;
422 }
423 item->touchscreen_data->slots[item->touchscreen_data->current_slot].pressure = event->value;
424 if (item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta == EVDEV_TOUCH_SLOTDELTA_NONE) {
425 item->touchscreen_data->slots[item->touchscreen_data->current_slot].delta = EVDEV_TOUCH_SLOTDELTA_MOVE;
426 }
427 break;
428 case ABS_X:
429 if (item->is_touchscreen) {
430 if (item->touchscreen_data->max_slots != 1) {
431 break;
432 }
433 item->touchscreen_data->slots[0].x = event->value;
434 } else if (!item->relative_mouse) {
435 item->mouse_x = event->value;
436 }
437 break;
438 case ABS_Y:
439 if (item->is_touchscreen) {
440 if (item->touchscreen_data->max_slots != 1) {
441 break;
442 }
443 item->touchscreen_data->slots[0].y = event->value;
444 } else if (!item->relative_mouse) {
445 item->mouse_y = event->value;
446 }
447 break;
448 default:
449 break;
450 }
451 break;
452 case EV_REL:
453 switch (event->code) {
454 case REL_X:
455 if (item->relative_mouse) {
456 item->mouse_x += event->value;
457 }
458 break;
459 case REL_Y:
460 if (item->relative_mouse) {
461 item->mouse_y += event->value;
462 }
463 break;
464 case REL_WHEEL:
465 if (!item->high_res_wheel) {
466 item->mouse_wheel += event->value;
467 }
468 break;
469 case REL_WHEEL_HI_RES:
470 SDL_assert(item->high_res_wheel);
471 item->mouse_wheel += event->value;
472 break;
473 case REL_HWHEEL:
474 if (!item->high_res_hwheel) {
475 item->mouse_hwheel += event->value;
476 }
477 break;
478 case REL_HWHEEL_HI_RES:
479 SDL_assert(item->high_res_hwheel);
480 item->mouse_hwheel += event->value;
481 break;
482 default:
483 break;
484 }
485 break;
486 case EV_SYN:
487 switch (event->code) {
488 case SYN_REPORT:
489 // Send mouse axis changes together to ensure consistency and reduce event processing overhead
490 if (item->relative_mouse) {
491 if (item->mouse_x != 0 || item->mouse_y != 0) {
492 Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
493 SDL_SendMouseMotion(timestamp, mouse->focus, (SDL_MouseID)item->fd, item->relative_mouse, (float)item->mouse_x, (float)item->mouse_y);
494 item->mouse_x = item->mouse_y = 0;
495 }
496 } else if (item->range_x > 0 && item->range_y > 0) {
497 int screen_w = 0, screen_h = 0;
498 const SDL_DisplayMode *mode = NULL;
499
500 if (mouse->focus) {
501 mode = SDL_GetCurrentDisplayMode(SDL_GetDisplayForWindow(mouse->focus));
502 }
503 if (!mode) {
504 mode = SDL_GetCurrentDisplayMode(SDL_GetPrimaryDisplay());
505 }
506 if (mode) {
507 screen_w = mode->w;
508 screen_h = mode->h;
509 }
510 SDL_SendMouseMotion(SDL_EVDEV_GetEventTimestamp(event), mouse->focus, (SDL_MouseID)item->fd, item->relative_mouse,
511 (float)(item->mouse_x - item->min_x) * screen_w / item->range_x,
512 (float)(item->mouse_y - item->min_y) * screen_h / item->range_y);
513 }
514
515 if (item->mouse_wheel != 0 || item->mouse_hwheel != 0) {
516 Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
517 const float denom = (item->high_res_hwheel ? 120.0f : 1.0f);
518 SDL_SendMouseWheel(timestamp,
519 mouse->focus, (SDL_MouseID)item->fd,
520 item->mouse_hwheel / denom,
521 item->mouse_wheel / denom,
522 SDL_MOUSEWHEEL_NORMAL);
523 item->mouse_wheel = item->mouse_hwheel = 0;
524 }
525
526 if (!item->is_touchscreen) { // FIXME: temp hack
527 break;
528 }
529
530 for (j = 0; j < item->touchscreen_data->max_slots; j++) {
531 norm_x = (float)(item->touchscreen_data->slots[j].x - item->touchscreen_data->min_x) /
532 (float)item->touchscreen_data->range_x;
533 norm_y = (float)(item->touchscreen_data->slots[j].y - item->touchscreen_data->min_y) /
534 (float)item->touchscreen_data->range_y;
535
536 if (item->touchscreen_data->range_pressure > 0) {
537 norm_pressure = (float)(item->touchscreen_data->slots[j].pressure - item->touchscreen_data->min_pressure) /
538 (float)item->touchscreen_data->range_pressure;
539 } else {
540 // This touchscreen does not support pressure
541 norm_pressure = 1.0f;
542 }
543
544 /* FIXME: the touch's window shouldn't be null, but
545 * the coordinate space of touch positions needs to
546 * be window-relative in that case. */
547 switch (item->touchscreen_data->slots[j].delta) {
548 case EVDEV_TOUCH_SLOTDELTA_DOWN:
549 SDL_SendTouch(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, NULL, SDL_EVENT_FINGER_DOWN, norm_x, norm_y, norm_pressure);
550 item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
551 break;
552 case EVDEV_TOUCH_SLOTDELTA_UP:
553 SDL_SendTouch(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, NULL, SDL_EVENT_FINGER_UP, norm_x, norm_y, norm_pressure);
554 item->touchscreen_data->slots[j].tracking_id = 0;
555 item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
556 break;
557 case EVDEV_TOUCH_SLOTDELTA_MOVE:
558 SDL_SendTouchMotion(SDL_EVDEV_GetEventTimestamp(event), item->fd, item->touchscreen_data->slots[j].tracking_id, NULL, norm_x, norm_y, norm_pressure);
559 item->touchscreen_data->slots[j].delta = EVDEV_TOUCH_SLOTDELTA_NONE;
560 break;
561 default:
562 break;
563 }
564 }
565
566 if (item->out_of_sync) {
567 item->out_of_sync = false;
568 }
569 break;
570 case SYN_DROPPED:
571 if (item->is_touchscreen) {
572 item->out_of_sync = true;
573 }
574 SDL_EVDEV_sync_device(item);
575 break;
576 default:
577 break;
578 }
579 break;
580 }
581 }
582 }
583 }
584}
585
586static SDL_Scancode SDL_EVDEV_translate_keycode(int keycode)
587{
588 SDL_Scancode scancode = SDL_GetScancodeFromTable(SDL_SCANCODE_TABLE_LINUX, keycode);
589
590#ifdef DEBUG_SCANCODES
591 if (scancode == SDL_SCANCODE_UNKNOWN) {
592 /* BTN_TOUCH is handled elsewhere, but we might still end up here if
593 you get an unexpected BTN_TOUCH from something SDL believes is not
594 a touch device. In this case, we'd rather not get a misleading
595 SDL_Log message about an unknown key. */
596 if (keycode != BTN_TOUCH) {
597 SDL_Log("The key you just pressed is not recognized by SDL. To help "
598 "get this fixed, please report this to the SDL forums/mailing list "
599 "<https://discourse.libsdl.org/> EVDEV KeyCode %d",
600 keycode);
601 }
602 }
603#endif // DEBUG_SCANCODES
604
605 return scancode;
606}
607
608static bool SDL_EVDEV_init_keyboard(SDL_evdevlist_item *item, int udev_class)
609{
610 char name[128];
611
612 name[0] = '\0';
613 ioctl(item->fd, EVIOCGNAME(sizeof(name)), name);
614
615 SDL_AddKeyboard((SDL_KeyboardID)item->fd, name, true);
616
617 return true;
618}
619
620static void SDL_EVDEV_destroy_keyboard(SDL_evdevlist_item *item)
621{
622 SDL_RemoveKeyboard((SDL_KeyboardID)item->fd, true);
623}
624
625static bool SDL_EVDEV_init_mouse(SDL_evdevlist_item *item, int udev_class)
626{
627 char name[128];
628 int ret;
629 struct input_absinfo abs_info;
630
631 name[0] = '\0';
632 ioctl(item->fd, EVIOCGNAME(sizeof(name)), name);
633
634 SDL_AddMouse((SDL_MouseID)item->fd, name, true);
635
636 ret = ioctl(item->fd, EVIOCGABS(ABS_X), &abs_info);
637 if (ret < 0) {
638 // no absolute mode info, continue
639 return true;
640 }
641 item->min_x = abs_info.minimum;
642 item->max_x = abs_info.maximum;
643 item->range_x = abs_info.maximum - abs_info.minimum;
644
645 ret = ioctl(item->fd, EVIOCGABS(ABS_Y), &abs_info);
646 if (ret < 0) {
647 // no absolute mode info, continue
648 return true;
649 }
650 item->min_y = abs_info.minimum;
651 item->max_y = abs_info.maximum;
652 item->range_y = abs_info.maximum - abs_info.minimum;
653
654 return true;
655}
656
657static void SDL_EVDEV_destroy_mouse(SDL_evdevlist_item *item)
658{
659 SDL_RemoveMouse((SDL_MouseID)item->fd, true);
660}
661
662static bool SDL_EVDEV_init_touchscreen(SDL_evdevlist_item *item, int udev_class)
663{
664 int ret;
665 unsigned long xreq, yreq;
666 char name[64];
667 struct input_absinfo abs_info;
668
669 if (!item->is_touchscreen) {
670 return true;
671 }
672
673 item->touchscreen_data = SDL_calloc(1, sizeof(*item->touchscreen_data));
674 if (!item->touchscreen_data) {
675 return false;
676 }
677
678 ret = ioctl(item->fd, EVIOCGNAME(sizeof(name)), name);
679 if (ret < 0) {
680 SDL_free(item->touchscreen_data);
681 return SDL_SetError("Failed to get evdev touchscreen name");
682 }
683
684 item->touchscreen_data->name = SDL_strdup(name);
685 if (!item->touchscreen_data->name) {
686 SDL_free(item->touchscreen_data);
687 return false;
688 }
689
690 ret = ioctl(item->fd, EVIOCGABS(ABS_MT_SLOT), &abs_info);
691 if (ret < 0) {
692 SDL_free(item->touchscreen_data->name);
693 SDL_free(item->touchscreen_data);
694 return SDL_SetError("Failed to get evdev touchscreen limits");
695 }
696
697 if (abs_info.maximum == 0) {
698 item->touchscreen_data->max_slots = 1;
699 xreq = EVIOCGABS(ABS_X);
700 yreq = EVIOCGABS(ABS_Y);
701 } else {
702 item->touchscreen_data->max_slots = abs_info.maximum + 1;
703 xreq = EVIOCGABS(ABS_MT_POSITION_X);
704 yreq = EVIOCGABS(ABS_MT_POSITION_Y);
705 }
706
707 ret = ioctl(item->fd, xreq, &abs_info);
708 if (ret < 0) {
709 SDL_free(item->touchscreen_data->name);
710 SDL_free(item->touchscreen_data);
711 return SDL_SetError("Failed to get evdev touchscreen limits");
712 }
713 item->touchscreen_data->min_x = abs_info.minimum;
714 item->touchscreen_data->max_x = abs_info.maximum;
715 item->touchscreen_data->range_x = abs_info.maximum - abs_info.minimum;
716
717 ret = ioctl(item->fd, yreq, &abs_info);
718 if (ret < 0) {
719 SDL_free(item->touchscreen_data->name);
720 SDL_free(item->touchscreen_data);
721 return SDL_SetError("Failed to get evdev touchscreen limits");
722 }
723 item->touchscreen_data->min_y = abs_info.minimum;
724 item->touchscreen_data->max_y = abs_info.maximum;
725 item->touchscreen_data->range_y = abs_info.maximum - abs_info.minimum;
726
727 ret = ioctl(item->fd, EVIOCGABS(ABS_MT_PRESSURE), &abs_info);
728 if (ret < 0) {
729 SDL_free(item->touchscreen_data->name);
730 SDL_free(item->touchscreen_data);
731 return SDL_SetError("Failed to get evdev touchscreen limits");
732 }
733 item->touchscreen_data->min_pressure = abs_info.minimum;
734 item->touchscreen_data->max_pressure = abs_info.maximum;
735 item->touchscreen_data->range_pressure = abs_info.maximum - abs_info.minimum;
736
737 item->touchscreen_data->slots = SDL_calloc(
738 item->touchscreen_data->max_slots,
739 sizeof(*item->touchscreen_data->slots));
740 if (!item->touchscreen_data->slots) {
741 SDL_free(item->touchscreen_data->name);
742 SDL_free(item->touchscreen_data);
743 return false;
744 }
745
746 ret = SDL_AddTouch(item->fd, // I guess our fd is unique enough
747 (udev_class & SDL_UDEV_DEVICE_TOUCHPAD) ? SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE : SDL_TOUCH_DEVICE_DIRECT,
748 item->touchscreen_data->name);
749 if (ret < 0) {
750 SDL_free(item->touchscreen_data->slots);
751 SDL_free(item->touchscreen_data->name);
752 SDL_free(item->touchscreen_data);
753 return false;
754 }
755
756 return true;
757}
758
759static void SDL_EVDEV_destroy_touchscreen(SDL_evdevlist_item *item)
760{
761 if (!item->is_touchscreen) {
762 return;
763 }
764
765 SDL_DelTouch(item->fd);
766 SDL_free(item->touchscreen_data->slots);
767 SDL_free(item->touchscreen_data->name);
768 SDL_free(item->touchscreen_data);
769}
770
771static void SDL_EVDEV_sync_device(SDL_evdevlist_item *item)
772{
773#ifdef EVIOCGMTSLOTS
774 int i, ret;
775 struct input_absinfo abs_info;
776 /*
777 * struct input_mt_request_layout {
778 * __u32 code;
779 * __s32 values[num_slots];
780 * };
781 *
782 * this is the structure we're trying to emulate
783 */
784 Uint32 *mt_req_code;
785 Sint32 *mt_req_values;
786 size_t mt_req_size;
787
788 // TODO: sync devices other than touchscreen
789 if (!item->is_touchscreen) {
790 return;
791 }
792
793 mt_req_size = sizeof(*mt_req_code) +
794 sizeof(*mt_req_values) * item->touchscreen_data->max_slots;
795
796 mt_req_code = SDL_calloc(1, mt_req_size);
797 if (!mt_req_code) {
798 return;
799 }
800
801 mt_req_values = (Sint32 *)mt_req_code + 1;
802
803 *mt_req_code = ABS_MT_TRACKING_ID;
804 ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);
805 if (ret < 0) {
806 SDL_free(mt_req_code);
807 return;
808 }
809 for (i = 0; i < item->touchscreen_data->max_slots; i++) {
810 /*
811 * This doesn't account for the very edge case of the user removing their
812 * finger and replacing it on the screen during the time we're out of sync,
813 * which'll mean that we're not going from down -> up or up -> down, we're
814 * going from down -> down but with a different tracking id, meaning we'd
815 * have to tell SDL of the two events, but since we wait till SYN_REPORT in
816 * SDL_EVDEV_Poll to tell SDL, the current structure of this code doesn't
817 * allow it. Lets just pray to God it doesn't happen.
818 */
819 if (item->touchscreen_data->slots[i].tracking_id == 0 &&
820 mt_req_values[i] >= 0) {
821 item->touchscreen_data->slots[i].tracking_id = mt_req_values[i] + 1;
822 item->touchscreen_data->slots[i].delta = EVDEV_TOUCH_SLOTDELTA_DOWN;
823 } else if (item->touchscreen_data->slots[i].tracking_id != 0 &&
824 mt_req_values[i] < 0) {
825 item->touchscreen_data->slots[i].tracking_id = 0;
826 item->touchscreen_data->slots[i].delta = EVDEV_TOUCH_SLOTDELTA_UP;
827 }
828 }
829
830 *mt_req_code = ABS_MT_POSITION_X;
831 ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);
832 if (ret < 0) {
833 SDL_free(mt_req_code);
834 return;
835 }
836 for (i = 0; i < item->touchscreen_data->max_slots; i++) {
837 if (item->touchscreen_data->slots[i].tracking_id != 0 &&
838 item->touchscreen_data->slots[i].x != mt_req_values[i]) {
839 item->touchscreen_data->slots[i].x = mt_req_values[i];
840 if (item->touchscreen_data->slots[i].delta ==
841 EVDEV_TOUCH_SLOTDELTA_NONE) {
842 item->touchscreen_data->slots[i].delta =
843 EVDEV_TOUCH_SLOTDELTA_MOVE;
844 }
845 }
846 }
847
848 *mt_req_code = ABS_MT_POSITION_Y;
849 ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);
850 if (ret < 0) {
851 SDL_free(mt_req_code);
852 return;
853 }
854 for (i = 0; i < item->touchscreen_data->max_slots; i++) {
855 if (item->touchscreen_data->slots[i].tracking_id != 0 &&
856 item->touchscreen_data->slots[i].y != mt_req_values[i]) {
857 item->touchscreen_data->slots[i].y = mt_req_values[i];
858 if (item->touchscreen_data->slots[i].delta ==
859 EVDEV_TOUCH_SLOTDELTA_NONE) {
860 item->touchscreen_data->slots[i].delta =
861 EVDEV_TOUCH_SLOTDELTA_MOVE;
862 }
863 }
864 }
865
866 *mt_req_code = ABS_MT_PRESSURE;
867 ret = ioctl(item->fd, EVIOCGMTSLOTS(mt_req_size), mt_req_code);
868 if (ret < 0) {
869 SDL_free(mt_req_code);
870 return;
871 }
872 for (i = 0; i < item->touchscreen_data->max_slots; i++) {
873 if (item->touchscreen_data->slots[i].tracking_id != 0 &&
874 item->touchscreen_data->slots[i].pressure != mt_req_values[i]) {
875 item->touchscreen_data->slots[i].pressure = mt_req_values[i];
876 if (item->touchscreen_data->slots[i].delta ==
877 EVDEV_TOUCH_SLOTDELTA_NONE) {
878 item->touchscreen_data->slots[i].delta =
879 EVDEV_TOUCH_SLOTDELTA_MOVE;
880 }
881 }
882 }
883
884 ret = ioctl(item->fd, EVIOCGABS(ABS_MT_SLOT), &abs_info);
885 if (ret < 0) {
886 SDL_free(mt_req_code);
887 return;
888 }
889 item->touchscreen_data->current_slot = abs_info.value;
890
891 SDL_free(mt_req_code);
892
893#endif // EVIOCGMTSLOTS
894}
895
896static bool SDL_EVDEV_device_added(const char *dev_path, int udev_class)
897{
898 SDL_evdevlist_item *item;
899 unsigned long relbit[NBITS(REL_MAX)] = { 0 };
900
901 // Check to make sure it's not already in list.
902 for (item = _this->first; item; item = item->next) {
903 if (SDL_strcmp(dev_path, item->path) == 0) {
904 return false; // already have this one
905 }
906 }
907
908 item = (SDL_evdevlist_item *)SDL_calloc(1, sizeof(SDL_evdevlist_item));
909 if (!item) {
910 return false;
911 }
912
913 item->fd = open(dev_path, O_RDONLY | O_NONBLOCK | O_CLOEXEC);
914 if (item->fd < 0) {
915 SDL_free(item);
916 return SDL_SetError("Unable to open %s", dev_path);
917 }
918
919 item->path = SDL_strdup(dev_path);
920 if (!item->path) {
921 close(item->fd);
922 SDL_free(item);
923 return false;
924 }
925
926 item->udev_class = udev_class;
927
928 if (ioctl(item->fd, EVIOCGBIT(EV_REL, sizeof(relbit)), relbit) >= 0) {
929 item->relative_mouse = test_bit(REL_X, relbit) && test_bit(REL_Y, relbit);
930 item->high_res_wheel = test_bit(REL_WHEEL_HI_RES, relbit);
931 item->high_res_hwheel = test_bit(REL_HWHEEL_HI_RES, relbit);
932 }
933
934 // For now, we just treat a touchpad like a touchscreen
935 if (udev_class & (SDL_UDEV_DEVICE_TOUCHSCREEN | SDL_UDEV_DEVICE_TOUCHPAD)) {
936 item->is_touchscreen = true;
937 if (!SDL_EVDEV_init_touchscreen(item, udev_class)) {
938 close(item->fd);
939 SDL_free(item->path);
940 SDL_free(item);
941 return false;
942 }
943 }
944
945 if (udev_class & SDL_UDEV_DEVICE_MOUSE) {
946 if (!SDL_EVDEV_init_mouse(item, udev_class)) {
947 close(item->fd);
948 SDL_free(item->path);
949 SDL_free(item);
950 return false;
951 }
952 }
953
954 if (udev_class & SDL_UDEV_DEVICE_KEYBOARD) {
955 if (!SDL_EVDEV_init_keyboard(item, udev_class)) {
956 close(item->fd);
957 SDL_free(item->path);
958 SDL_free(item);
959 return false;
960 }
961 }
962
963 if (!_this->last) {
964 _this->first = _this->last = item;
965 } else {
966 _this->last->next = item;
967 _this->last = item;
968 }
969
970 SDL_EVDEV_sync_device(item);
971
972 SDL_EVDEV_UpdateKeyboardMute();
973
974 ++_this->num_devices;
975 return true;
976}
977
978static bool SDL_EVDEV_device_removed(const char *dev_path)
979{
980 SDL_evdevlist_item *item;
981 SDL_evdevlist_item *prev = NULL;
982
983 for (item = _this->first; item; item = item->next) {
984 // found it, remove it.
985 if (SDL_strcmp(dev_path, item->path) == 0) {
986 if (prev) {
987 prev->next = item->next;
988 } else {
989 SDL_assert(_this->first == item);
990 _this->first = item->next;
991 }
992 if (item == _this->last) {
993 _this->last = prev;
994 }
995
996 if (item->is_touchscreen) {
997 SDL_EVDEV_destroy_touchscreen(item);
998 }
999 if (item->udev_class & SDL_UDEV_DEVICE_MOUSE) {
1000 SDL_EVDEV_destroy_mouse(item);
1001 }
1002 if (item->udev_class & SDL_UDEV_DEVICE_KEYBOARD) {
1003 SDL_EVDEV_destroy_keyboard(item);
1004 }
1005 close(item->fd);
1006 SDL_free(item->path);
1007 SDL_free(item);
1008 SDL_EVDEV_UpdateKeyboardMute();
1009 _this->num_devices--;
1010 return true;
1011 }
1012 prev = item;
1013 }
1014
1015 return false;
1016}
1017
1018Uint64 SDL_EVDEV_GetEventTimestamp(struct input_event *event)
1019{
1020 static Uint64 timestamp_offset;
1021 Uint64 timestamp;
1022 Uint64 now = SDL_GetTicksNS();
1023
1024 /* The kernel internally has nanosecond timestamps, but converts it
1025 to microseconds when delivering the events */
1026 timestamp = event->input_event_sec;
1027 timestamp *= SDL_NS_PER_SECOND;
1028 timestamp += SDL_US_TO_NS(event->input_event_usec);
1029
1030 if (!timestamp_offset) {
1031 timestamp_offset = (now - timestamp);
1032 }
1033 timestamp += timestamp_offset;
1034
1035 if (timestamp > now) {
1036 timestamp_offset -= (timestamp - now);
1037 timestamp = now;
1038 }
1039 return timestamp;
1040}
1041
1042#endif // SDL_INPUT_LINUXEV
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_evdev.h b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev.h
new file mode 100644
index 0000000..d3e2fe1
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev.h
@@ -0,0 +1,41 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#include "SDL_internal.h"
23
24#ifndef SDL_evdev_h_
25#define SDL_evdev_h_
26
27#ifdef SDL_INPUT_LINUXEV
28
29struct input_event;
30
31extern bool SDL_EVDEV_Init(void);
32extern void SDL_EVDEV_Quit(void);
33extern void SDL_EVDEV_SetVTSwitchCallbacks(void (*release_callback)(void*), void *release_callback_data,
34 void (*acquire_callback)(void*), void *acquire_callback_data);
35extern int SDL_EVDEV_GetDeviceCount(int device_class);
36extern void SDL_EVDEV_Poll(void);
37extern Uint64 SDL_EVDEV_GetEventTimestamp(struct input_event *event);
38
39#endif // SDL_INPUT_LINUXEV
40
41#endif // SDL_evdev_h_
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_capabilities.c b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_capabilities.c
new file mode 100644
index 0000000..61e240e
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_capabilities.c
@@ -0,0 +1,168 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4 Copyright (C) 2020 Collabora Ltd.
5
6 This software is provided 'as-is', without any express or implied
7 warranty. In no event will the authors be held liable for any damages
8 arising from the use of this software.
9
10 Permission is granted to anyone to use this software for any purpose,
11 including commercial applications, and to alter it and redistribute it
12 freely, subject to the following restrictions:
13
14 1. The origin of this software must not be misrepresented; you must not
15 claim that you wrote the original software. If you use this software
16 in a product, an acknowledgment in the product documentation would be
17 appreciated but is not required.
18 2. Altered source versions must be plainly marked as such, and must not be
19 misrepresented as being the original software.
20 3. This notice may not be removed or altered from any source distribution.
21*/
22#include "SDL_internal.h"
23
24#include "SDL_evdev_capabilities.h"
25
26#ifdef HAVE_LINUX_INPUT_H
27
28// missing defines in older Linux kernel headers
29#ifndef BTN_TRIGGER_HAPPY
30#define BTN_TRIGGER_HAPPY 0x2c0
31#endif
32#ifndef BTN_DPAD_UP
33#define BTN_DPAD_UP 0x220
34#endif
35#ifndef KEY_ALS_TOGGLE
36#define KEY_ALS_TOGGLE 0x230
37#endif
38
39extern int
40SDL_EVDEV_GuessDeviceClass(const unsigned long bitmask_props[NBITS(INPUT_PROP_MAX)],
41 const unsigned long bitmask_ev[NBITS(EV_MAX)],
42 const unsigned long bitmask_abs[NBITS(ABS_MAX)],
43 const unsigned long bitmask_key[NBITS(KEY_MAX)],
44 const unsigned long bitmask_rel[NBITS(REL_MAX)])
45{
46 struct range
47 {
48 unsigned start;
49 unsigned end;
50 };
51
52 // key code ranges above BTN_MISC (start is inclusive, stop is exclusive)
53 static const struct range high_key_blocks[] = {
54 { KEY_OK, BTN_DPAD_UP },
55 { KEY_ALS_TOGGLE, BTN_TRIGGER_HAPPY }
56 };
57
58 int devclass = 0;
59 unsigned long keyboard_mask;
60
61 // If the kernel specifically says it's an accelerometer, believe it
62 if (test_bit(INPUT_PROP_ACCELEROMETER, bitmask_props)) {
63 return SDL_UDEV_DEVICE_ACCELEROMETER;
64 }
65
66 // We treat pointing sticks as indistinguishable from mice
67 if (test_bit(INPUT_PROP_POINTING_STICK, bitmask_props)) {
68 return SDL_UDEV_DEVICE_MOUSE;
69 }
70
71 // We treat buttonpads as equivalent to touchpads
72 if (test_bit(INPUT_PROP_TOPBUTTONPAD, bitmask_props) ||
73 test_bit(INPUT_PROP_BUTTONPAD, bitmask_props) ||
74 test_bit(INPUT_PROP_SEMI_MT, bitmask_props)) {
75 return SDL_UDEV_DEVICE_TOUCHPAD;
76 }
77
78 // X, Y, Z axes but no buttons probably means an accelerometer
79 if (test_bit(EV_ABS, bitmask_ev) &&
80 test_bit(ABS_X, bitmask_abs) &&
81 test_bit(ABS_Y, bitmask_abs) &&
82 test_bit(ABS_Z, bitmask_abs) &&
83 !test_bit(EV_KEY, bitmask_ev)) {
84 return SDL_UDEV_DEVICE_ACCELEROMETER;
85 }
86
87 /* RX, RY, RZ axes but no buttons probably means a gyro or
88 * accelerometer (we don't distinguish) */
89 if (test_bit(EV_ABS, bitmask_ev) &&
90 test_bit(ABS_RX, bitmask_abs) &&
91 test_bit(ABS_RY, bitmask_abs) &&
92 test_bit(ABS_RZ, bitmask_abs) &&
93 !test_bit(EV_KEY, bitmask_ev)) {
94 return SDL_UDEV_DEVICE_ACCELEROMETER;
95 }
96
97 if (test_bit(EV_ABS, bitmask_ev) &&
98 test_bit(ABS_X, bitmask_abs) && test_bit(ABS_Y, bitmask_abs)) {
99 if (test_bit(BTN_STYLUS, bitmask_key) || test_bit(BTN_TOOL_PEN, bitmask_key)) {
100 ; // ID_INPUT_TABLET
101 } else if (test_bit(BTN_TOOL_FINGER, bitmask_key) && !test_bit(BTN_TOOL_PEN, bitmask_key)) {
102 devclass |= SDL_UDEV_DEVICE_TOUCHPAD; // ID_INPUT_TOUCHPAD
103 } else if (test_bit(BTN_MOUSE, bitmask_key)) {
104 devclass |= SDL_UDEV_DEVICE_MOUSE; // ID_INPUT_MOUSE
105 } else if (test_bit(BTN_TOUCH, bitmask_key)) {
106 /* TODO: better determining between touchscreen and multitouch touchpad,
107 see https://github.com/systemd/systemd/blob/master/src/udev/udev-builtin-input_id.c */
108 devclass |= SDL_UDEV_DEVICE_TOUCHSCREEN; // ID_INPUT_TOUCHSCREEN
109 }
110
111 if (test_bit(BTN_TRIGGER, bitmask_key) ||
112 test_bit(BTN_A, bitmask_key) ||
113 test_bit(BTN_1, bitmask_key) ||
114 test_bit(ABS_RX, bitmask_abs) ||
115 test_bit(ABS_RY, bitmask_abs) ||
116 test_bit(ABS_RZ, bitmask_abs) ||
117 test_bit(ABS_THROTTLE, bitmask_abs) ||
118 test_bit(ABS_RUDDER, bitmask_abs) ||
119 test_bit(ABS_WHEEL, bitmask_abs) ||
120 test_bit(ABS_GAS, bitmask_abs) ||
121 test_bit(ABS_BRAKE, bitmask_abs)) {
122 devclass |= SDL_UDEV_DEVICE_JOYSTICK; // ID_INPUT_JOYSTICK
123 }
124 }
125
126 if (test_bit(EV_REL, bitmask_ev) &&
127 test_bit(REL_X, bitmask_rel) && test_bit(REL_Y, bitmask_rel) &&
128 test_bit(BTN_MOUSE, bitmask_key)) {
129 devclass |= SDL_UDEV_DEVICE_MOUSE; // ID_INPUT_MOUSE
130 }
131
132 if (test_bit(EV_KEY, bitmask_ev)) {
133 unsigned i;
134 unsigned long found = 0;
135
136 for (i = 0; i < BTN_MISC / BITS_PER_LONG; ++i) {
137 found |= bitmask_key[i];
138 }
139 // If there are no keys in the lower block, check the higher blocks
140 if (!found) {
141 unsigned block;
142 for (block = 0; block < (sizeof(high_key_blocks) / sizeof(struct range)); ++block) {
143 for (i = high_key_blocks[block].start; i < high_key_blocks[block].end; ++i) {
144 if (test_bit(i, bitmask_key)) {
145 found = 1;
146 break;
147 }
148 }
149 }
150 }
151
152 if (found > 0) {
153 devclass |= SDL_UDEV_DEVICE_HAS_KEYS; // ID_INPUT_KEY
154 }
155 }
156
157 /* the first 32 bits are ESC, numbers, and Q to D, so if we have all of
158 * those, consider it to be a fully-featured keyboard;
159 * do not test KEY_RESERVED, though */
160 keyboard_mask = 0xFFFFFFFE;
161 if ((bitmask_key[0] & keyboard_mask) == keyboard_mask) {
162 devclass |= SDL_UDEV_DEVICE_KEYBOARD; // ID_INPUT_KEYBOARD
163 }
164
165 return devclass;
166}
167
168#endif // HAVE_LINUX_INPUT_H
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_capabilities.h b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_capabilities.h
new file mode 100644
index 0000000..5a70bdd
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_capabilities.h
@@ -0,0 +1,76 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4 Copyright (C) 2020 Collabora Ltd.
5
6 This software is provided 'as-is', without any express or implied
7 warranty. In no event will the authors be held liable for any damages
8 arising from the use of this software.
9
10 Permission is granted to anyone to use this software for any purpose,
11 including commercial applications, and to alter it and redistribute it
12 freely, subject to the following restrictions:
13
14 1. The origin of this software must not be misrepresented; you must not
15 claim that you wrote the original software. If you use this software
16 in a product, an acknowledgment in the product documentation would be
17 appreciated but is not required.
18 2. Altered source versions must be plainly marked as such, and must not be
19 misrepresented as being the original software.
20 3. This notice may not be removed or altered from any source distribution.
21*/
22#include "SDL_internal.h"
23
24#ifndef SDL_evdev_capabilities_h_
25#define SDL_evdev_capabilities_h_
26
27#ifdef HAVE_LINUX_INPUT_H
28
29#include <linux/input.h>
30
31#ifndef INPUT_PROP_SEMI_MT
32#define INPUT_PROP_SEMI_MT 0x03
33#endif
34#ifndef INPUT_PROP_TOPBUTTONPAD
35#define INPUT_PROP_TOPBUTTONPAD 0x04
36#endif
37#ifndef INPUT_PROP_POINTING_STICK
38#define INPUT_PROP_POINTING_STICK 0x05
39#endif
40#ifndef INPUT_PROP_ACCELEROMETER
41#define INPUT_PROP_ACCELEROMETER 0x06
42#endif
43#ifndef INPUT_PROP_MAX
44#define INPUT_PROP_MAX 0x1f
45#endif
46
47// A device can be any combination of these classes
48typedef enum
49{
50 SDL_UDEV_DEVICE_UNKNOWN = 0x0000,
51 SDL_UDEV_DEVICE_MOUSE = 0x0001,
52 SDL_UDEV_DEVICE_KEYBOARD = 0x0002,
53 SDL_UDEV_DEVICE_JOYSTICK = 0x0004,
54 SDL_UDEV_DEVICE_SOUND = 0x0008,
55 SDL_UDEV_DEVICE_TOUCHSCREEN = 0x0010,
56 SDL_UDEV_DEVICE_ACCELEROMETER = 0x0020,
57 SDL_UDEV_DEVICE_TOUCHPAD = 0x0040,
58 SDL_UDEV_DEVICE_HAS_KEYS = 0x0080,
59 SDL_UDEV_DEVICE_VIDEO_CAPTURE = 0x0100,
60} SDL_UDEV_deviceclass;
61
62#define BITS_PER_LONG (sizeof(unsigned long) * 8)
63#define NBITS(x) ((((x)-1) / BITS_PER_LONG) + 1)
64#define EVDEV_OFF(x) ((x) % BITS_PER_LONG)
65#define EVDEV_LONG(x) ((x) / BITS_PER_LONG)
66#define test_bit(bit, array) ((array[EVDEV_LONG(bit)] >> EVDEV_OFF(bit)) & 1)
67
68extern int SDL_EVDEV_GuessDeviceClass(const unsigned long bitmask_props[NBITS(INPUT_PROP_MAX)],
69 const unsigned long bitmask_ev[NBITS(EV_MAX)],
70 const unsigned long bitmask_abs[NBITS(ABS_MAX)],
71 const unsigned long bitmask_key[NBITS(KEY_MAX)],
72 const unsigned long bitmask_rel[NBITS(REL_MAX)]);
73
74#endif // HAVE_LINUX_INPUT_H
75
76#endif // SDL_evdev_capabilities_h_
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd.c b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd.c
new file mode 100644
index 0000000..b1a5664
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd.c
@@ -0,0 +1,997 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23#include "SDL_evdev_kbd.h"
24
25#ifdef SDL_INPUT_LINUXKD
26
27// This logic is adapted from drivers/tty/vt/keyboard.c in the Linux kernel source
28
29#include <unistd.h>
30#include <fcntl.h>
31#include <sys/ioctl.h>
32#include <linux/kd.h>
33#include <linux/keyboard.h>
34#include <linux/vt.h>
35#include <linux/tiocl.h> // for TIOCL_GETSHIFTSTATE
36
37#include <signal.h>
38
39#include "../../events/SDL_events_c.h"
40#include "SDL_evdev_kbd_default_accents.h"
41#include "SDL_evdev_kbd_default_keymap.h"
42
43// These are not defined in older Linux kernel headers
44#ifndef K_UNICODE
45#define K_UNICODE 0x03
46#endif
47#ifndef K_OFF
48#define K_OFF 0x04
49#endif
50
51/*
52 * Handler Tables.
53 */
54
55#define K_HANDLERS \
56 k_self, k_fn, k_spec, k_pad, \
57 k_dead, k_cons, k_cur, k_shift, \
58 k_meta, k_ascii, k_lock, k_lowercase, \
59 k_slock, k_dead2, k_brl, k_ignore
60
61typedef void(k_handler_fn)(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag);
62static k_handler_fn K_HANDLERS;
63static k_handler_fn *k_handler[16] = { K_HANDLERS };
64
65typedef void(fn_handler_fn)(SDL_EVDEV_keyboard_state *kbd);
66static void fn_enter(SDL_EVDEV_keyboard_state *kbd);
67static void fn_caps_toggle(SDL_EVDEV_keyboard_state *kbd);
68static void fn_caps_on(SDL_EVDEV_keyboard_state *kbd);
69static void fn_num(SDL_EVDEV_keyboard_state *kbd);
70static void fn_compose(SDL_EVDEV_keyboard_state *kbd);
71
72static fn_handler_fn *fn_handler[] = {
73 NULL, fn_enter, NULL, NULL,
74 NULL, NULL, NULL, fn_caps_toggle,
75 fn_num, NULL, NULL, NULL,
76 NULL, fn_caps_on, fn_compose, NULL,
77 NULL, NULL, NULL, fn_num
78};
79
80/*
81 * Keyboard State
82 */
83
84struct SDL_EVDEV_keyboard_state
85{
86 int console_fd;
87 bool muted;
88 int old_kbd_mode;
89 unsigned short **key_maps;
90 unsigned char shift_down[NR_SHIFT]; // shift state counters..
91 bool dead_key_next;
92 int npadch; // -1 or number assembled on pad
93 struct kbdiacrs *accents;
94 unsigned int diacr;
95 bool rep; // flag telling character repeat
96 unsigned char lockstate;
97 unsigned char slockstate;
98 unsigned char ledflagstate;
99 char shift_state;
100 char text[128];
101 unsigned int text_len;
102 void (*vt_release_callback)(void *);
103 void *vt_release_callback_data;
104 void (*vt_acquire_callback)(void *);
105 void *vt_acquire_callback_data;
106};
107
108#ifdef DUMP_ACCENTS
109static void SDL_EVDEV_dump_accents(SDL_EVDEV_keyboard_state *kbd)
110{
111 unsigned int i;
112
113 printf("static struct kbdiacrs default_accents = {\n");
114 printf(" %d,\n", kbd->accents->kb_cnt);
115 printf(" {\n");
116 for (i = 0; i < kbd->accents->kb_cnt; ++i) {
117 struct kbdiacr *diacr = &kbd->accents->kbdiacr[i];
118 printf(" { 0x%.2x, 0x%.2x, 0x%.2x },\n",
119 diacr->diacr, diacr->base, diacr->result);
120 }
121 while (i < 256) {
122 printf(" { 0x00, 0x00, 0x00 },\n");
123 ++i;
124 }
125 printf(" }\n");
126 printf("};\n");
127}
128#endif // DUMP_ACCENTS
129
130#ifdef DUMP_KEYMAP
131static void SDL_EVDEV_dump_keymap(SDL_EVDEV_keyboard_state *kbd)
132{
133 int i, j;
134
135 for (i = 0; i < MAX_NR_KEYMAPS; ++i) {
136 if (kbd->key_maps[i]) {
137 printf("static unsigned short default_key_map_%d[NR_KEYS] = {", i);
138 for (j = 0; j < NR_KEYS; ++j) {
139 if ((j % 8) == 0) {
140 printf("\n ");
141 }
142 printf("0x%.4x, ", kbd->key_maps[i][j]);
143 }
144 printf("\n};\n");
145 }
146 }
147 printf("\n");
148 printf("static unsigned short *default_key_maps[MAX_NR_KEYMAPS] = {\n");
149 for (i = 0; i < MAX_NR_KEYMAPS; ++i) {
150 if (kbd->key_maps[i]) {
151 printf(" default_key_map_%d,\n", i);
152 } else {
153 printf(" NULL,\n");
154 }
155 }
156 printf("};\n");
157}
158#endif // DUMP_KEYMAP
159
160static SDL_EVDEV_keyboard_state *kbd_cleanup_state = NULL;
161static int kbd_cleanup_sigactions_installed = 0;
162static int kbd_cleanup_atexit_installed = 0;
163
164static struct sigaction old_sigaction[NSIG];
165
166static int fatal_signals[] = {
167 // Handlers for SIGTERM and SIGINT are installed in SDL_InitQuit.
168 SIGHUP, SIGQUIT, SIGILL, SIGABRT,
169 SIGFPE, SIGSEGV, SIGPIPE, SIGBUS,
170 SIGSYS
171};
172
173static void kbd_cleanup(void)
174{
175 SDL_EVDEV_keyboard_state *kbd = kbd_cleanup_state;
176 if (!kbd) {
177 return;
178 }
179 kbd_cleanup_state = NULL;
180
181 ioctl(kbd->console_fd, KDSKBMODE, kbd->old_kbd_mode);
182}
183
184static void SDL_EVDEV_kbd_reraise_signal(int sig)
185{
186 (void)raise(sig);
187}
188
189static siginfo_t *SDL_EVDEV_kdb_cleanup_siginfo = NULL;
190static void *SDL_EVDEV_kdb_cleanup_ucontext = NULL;
191
192static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontext)
193{
194 struct sigaction *old_action_p = &(old_sigaction[signum]);
195 sigset_t sigset;
196
197 // Restore original signal handler before going any further.
198 sigaction(signum, old_action_p, NULL);
199
200 // Unmask current signal.
201 sigemptyset(&sigset);
202 sigaddset(&sigset, signum);
203 sigprocmask(SIG_UNBLOCK, &sigset, NULL);
204
205 // Save original signal info and context for archeologists.
206 SDL_EVDEV_kdb_cleanup_siginfo = info;
207 SDL_EVDEV_kdb_cleanup_ucontext = ucontext;
208
209 // Restore keyboard.
210 kbd_cleanup();
211
212 // Reraise signal.
213 SDL_EVDEV_kbd_reraise_signal(signum);
214}
215
216static void kbd_unregister_emerg_cleanup(void)
217{
218 int tabidx;
219
220 kbd_cleanup_state = NULL;
221
222 if (!kbd_cleanup_sigactions_installed) {
223 return;
224 }
225 kbd_cleanup_sigactions_installed = 0;
226
227 for (tabidx = 0; tabidx < sizeof(fatal_signals) / sizeof(fatal_signals[0]); ++tabidx) {
228 struct sigaction *old_action_p;
229 struct sigaction cur_action;
230 int signum = fatal_signals[tabidx];
231 old_action_p = &(old_sigaction[signum]);
232
233 // Examine current signal action
234 if (sigaction(signum, NULL, &cur_action)) {
235 continue;
236 }
237
238 // Check if action installed and not modified
239 if (!(cur_action.sa_flags & SA_SIGINFO) || cur_action.sa_sigaction != &kbd_cleanup_signal_action) {
240 continue;
241 }
242
243 // Restore original action
244 sigaction(signum, old_action_p, NULL);
245 }
246}
247
248static void kbd_cleanup_atexit(void)
249{
250 // Restore keyboard.
251 kbd_cleanup();
252
253 // Try to restore signal handlers in case shared library is being unloaded
254 kbd_unregister_emerg_cleanup();
255}
256
257static void kbd_register_emerg_cleanup(SDL_EVDEV_keyboard_state *kbd)
258{
259 int tabidx;
260
261 if (kbd_cleanup_state) {
262 return;
263 }
264 kbd_cleanup_state = kbd;
265
266 if (!kbd_cleanup_atexit_installed) {
267 /* Since glibc 2.2.3, atexit() (and on_exit(3)) can be used within a shared library to establish
268 * functions that are called when the shared library is unloaded.
269 * -- man atexit(3)
270 */
271 (void)atexit(kbd_cleanup_atexit);
272 kbd_cleanup_atexit_installed = 1;
273 }
274
275 if (kbd_cleanup_sigactions_installed) {
276 return;
277 }
278 kbd_cleanup_sigactions_installed = 1;
279
280 for (tabidx = 0; tabidx < sizeof(fatal_signals) / sizeof(fatal_signals[0]); ++tabidx) {
281 struct sigaction *old_action_p;
282 struct sigaction new_action;
283 int signum = fatal_signals[tabidx];
284 old_action_p = &(old_sigaction[signum]);
285 if (sigaction(signum, NULL, old_action_p)) {
286 continue;
287 }
288
289 /* Skip SIGHUP and SIGPIPE if handler is already installed
290 * - assume the handler will do the cleanup
291 */
292 if ((signum == SIGHUP || signum == SIGPIPE) && (old_action_p->sa_handler != SIG_DFL || (void (*)(int))old_action_p->sa_sigaction != SIG_DFL)) {
293 continue;
294 }
295
296 new_action = *old_action_p;
297 new_action.sa_flags |= SA_SIGINFO;
298 new_action.sa_sigaction = &kbd_cleanup_signal_action;
299 sigaction(signum, &new_action, NULL);
300 }
301}
302
303enum {
304 VT_SIGNAL_NONE,
305 VT_SIGNAL_RELEASE,
306 VT_SIGNAL_ACQUIRE,
307};
308static int vt_release_signal;
309static int vt_acquire_signal;
310static SDL_AtomicInt vt_signal_pending;
311
312typedef void (*signal_handler)(int signum);
313
314static void kbd_vt_release_signal_action(int signum)
315{
316 SDL_SetAtomicInt(&vt_signal_pending, VT_SIGNAL_RELEASE);
317}
318
319static void kbd_vt_acquire_signal_action(int signum)
320{
321 SDL_SetAtomicInt(&vt_signal_pending, VT_SIGNAL_ACQUIRE);
322}
323
324static bool setup_vt_signal(int signum, signal_handler handler)
325{
326 struct sigaction *old_action_p;
327 struct sigaction new_action;
328 old_action_p = &(old_sigaction[signum]);
329 SDL_zero(new_action);
330 new_action.sa_handler = handler;
331 new_action.sa_flags = SA_RESTART;
332 if (sigaction(signum, &new_action, old_action_p) < 0) {
333 return false;
334 }
335 if (old_action_p->sa_handler != SIG_DFL) {
336 // This signal is already in use
337 sigaction(signum, old_action_p, NULL);
338 return false;
339 }
340 return true;
341}
342
343static int find_free_signal(signal_handler handler)
344{
345#ifdef SIGRTMIN
346 int i;
347
348 for (i = SIGRTMIN + 2; i <= SIGRTMAX; ++i) {
349 if (setup_vt_signal(i, handler)) {
350 return i;
351 }
352 }
353#endif
354 if (setup_vt_signal(SIGUSR1, handler)) {
355 return SIGUSR1;
356 }
357 if (setup_vt_signal(SIGUSR2, handler)) {
358 return SIGUSR2;
359 }
360 return 0;
361}
362
363static void kbd_vt_quit(int console_fd)
364{
365 struct vt_mode mode;
366
367 if (vt_release_signal) {
368 sigaction(vt_release_signal, &old_sigaction[vt_release_signal], NULL);
369 vt_release_signal = 0;
370 }
371 if (vt_acquire_signal) {
372 sigaction(vt_acquire_signal, &old_sigaction[vt_acquire_signal], NULL);
373 vt_acquire_signal = 0;
374 }
375
376 SDL_zero(mode);
377 mode.mode = VT_AUTO;
378 ioctl(console_fd, VT_SETMODE, &mode);
379}
380
381static bool kbd_vt_init(int console_fd)
382{
383 struct vt_mode mode;
384
385 vt_release_signal = find_free_signal(kbd_vt_release_signal_action);
386 vt_acquire_signal = find_free_signal(kbd_vt_acquire_signal_action);
387 if (!vt_release_signal || !vt_acquire_signal ) {
388 kbd_vt_quit(console_fd);
389 return false;
390 }
391
392 SDL_zero(mode);
393 mode.mode = VT_PROCESS;
394 mode.relsig = vt_release_signal;
395 mode.acqsig = vt_acquire_signal;
396 mode.frsig = SIGIO;
397 if (ioctl(console_fd, VT_SETMODE, &mode) < 0) {
398 kbd_vt_quit(console_fd);
399 return false;
400 }
401 return true;
402}
403
404static void kbd_vt_update(SDL_EVDEV_keyboard_state *state)
405{
406 int signal_pending = SDL_GetAtomicInt(&vt_signal_pending);
407 if (signal_pending != VT_SIGNAL_NONE) {
408 if (signal_pending == VT_SIGNAL_RELEASE) {
409 if (state->vt_release_callback) {
410 state->vt_release_callback(state->vt_release_callback_data);
411 }
412 ioctl(state->console_fd, VT_RELDISP, 1);
413 } else {
414 if (state->vt_acquire_callback) {
415 state->vt_acquire_callback(state->vt_acquire_callback_data);
416 }
417 ioctl(state->console_fd, VT_RELDISP, VT_ACKACQ);
418 }
419 SDL_CompareAndSwapAtomicInt(&vt_signal_pending, signal_pending, VT_SIGNAL_NONE);
420 }
421}
422
423SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void)
424{
425 SDL_EVDEV_keyboard_state *kbd;
426 char flag_state;
427 char kbtype;
428 char shift_state[sizeof(long)] = { TIOCL_GETSHIFTSTATE, 0 };
429
430 kbd = (SDL_EVDEV_keyboard_state *)SDL_calloc(1, sizeof(*kbd));
431 if (!kbd) {
432 return NULL;
433 }
434
435 // This might fail if we're not connected to a tty (e.g. on the Steam Link)
436 kbd->console_fd = open("/dev/tty", O_RDONLY | O_CLOEXEC);
437 if (!((ioctl(kbd->console_fd, KDGKBTYPE, &kbtype) == 0) && ((kbtype == KB_101) || (kbtype == KB_84)))) {
438 close(kbd->console_fd);
439 kbd->console_fd = -1;
440 }
441
442 kbd->npadch = -1;
443
444 if (ioctl(kbd->console_fd, TIOCLINUX, shift_state) == 0) {
445 kbd->shift_state = *shift_state;
446 }
447
448 if (ioctl(kbd->console_fd, KDGKBLED, &flag_state) == 0) {
449 kbd->ledflagstate = flag_state;
450 }
451
452 kbd->accents = &default_accents;
453 kbd->key_maps = default_key_maps;
454
455 if (ioctl(kbd->console_fd, KDGKBMODE, &kbd->old_kbd_mode) == 0) {
456 // Set the keyboard in UNICODE mode and load the keymaps
457 ioctl(kbd->console_fd, KDSKBMODE, K_UNICODE);
458 }
459
460 kbd_vt_init(kbd->console_fd);
461
462 return kbd;
463}
464
465void SDL_EVDEV_kbd_set_muted(SDL_EVDEV_keyboard_state *state, bool muted)
466{
467 if (!state) {
468 return;
469 }
470
471 if (muted == state->muted) {
472 return;
473 }
474
475 if (muted) {
476 if (SDL_GetHintBoolean(SDL_HINT_MUTE_CONSOLE_KEYBOARD, true)) {
477 /* Mute the keyboard so keystrokes only generate evdev events
478 * and do not leak through to the console
479 */
480 ioctl(state->console_fd, KDSKBMODE, K_OFF);
481
482 /* Make sure to restore keyboard if application fails to call
483 * SDL_Quit before exit or fatal signal is raised.
484 */
485 if (!SDL_GetHintBoolean(SDL_HINT_NO_SIGNAL_HANDLERS, false)) {
486 kbd_register_emerg_cleanup(state);
487 }
488 }
489 } else {
490 kbd_unregister_emerg_cleanup();
491
492 // Restore the original keyboard mode
493 ioctl(state->console_fd, KDSKBMODE, state->old_kbd_mode);
494 }
495 state->muted = muted;
496}
497
498void SDL_EVDEV_kbd_set_vt_switch_callbacks(SDL_EVDEV_keyboard_state *state, void (*release_callback)(void*), void *release_callback_data, void (*acquire_callback)(void*), void *acquire_callback_data)
499{
500 if (state == NULL) {
501 return;
502 }
503
504 state->vt_release_callback = release_callback;
505 state->vt_release_callback_data = release_callback_data;
506 state->vt_acquire_callback = acquire_callback;
507 state->vt_acquire_callback_data = acquire_callback_data;
508}
509
510void SDL_EVDEV_kbd_update(SDL_EVDEV_keyboard_state *state)
511{
512 if (!state) {
513 return;
514 }
515
516 kbd_vt_update(state);
517}
518
519void SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *state)
520{
521 if (state == NULL) {
522 return;
523 }
524
525 SDL_EVDEV_kbd_set_muted(state, false);
526
527 kbd_vt_quit(state->console_fd);
528
529 if (state->console_fd >= 0) {
530 close(state->console_fd);
531 state->console_fd = -1;
532 }
533
534 if (state->key_maps && state->key_maps != default_key_maps) {
535 int i;
536 for (i = 0; i < MAX_NR_KEYMAPS; ++i) {
537 if (state->key_maps[i]) {
538 SDL_free(state->key_maps[i]);
539 }
540 }
541 SDL_free(state->key_maps);
542 }
543
544 SDL_free(state);
545}
546
547/*
548 * Helper Functions.
549 */
550static void put_queue(SDL_EVDEV_keyboard_state *kbd, uint c)
551{
552 // c is already part of a UTF-8 sequence and safe to add as a character
553 if (kbd->text_len < (sizeof(kbd->text) - 1)) {
554 kbd->text[kbd->text_len++] = (char)c;
555 }
556}
557
558static void put_utf8(SDL_EVDEV_keyboard_state *kbd, uint c)
559{
560 if (c < 0x80) {
561 put_queue(kbd, c); /* 0******* */
562 } else if (c < 0x800) {
563 /* 110***** 10****** */
564 put_queue(kbd, 0xc0 | (c >> 6));
565 put_queue(kbd, 0x80 | (c & 0x3f));
566 } else if (c < 0x10000) {
567 if (c >= 0xD800 && c < 0xE000) {
568 return;
569 }
570 if (c == 0xFFFF) {
571 return;
572 }
573 /* 1110**** 10****** 10****** */
574 put_queue(kbd, 0xe0 | (c >> 12));
575 put_queue(kbd, 0x80 | ((c >> 6) & 0x3f));
576 put_queue(kbd, 0x80 | (c & 0x3f));
577 } else if (c < 0x110000) {
578 /* 11110*** 10****** 10****** 10****** */
579 put_queue(kbd, 0xf0 | (c >> 18));
580 put_queue(kbd, 0x80 | ((c >> 12) & 0x3f));
581 put_queue(kbd, 0x80 | ((c >> 6) & 0x3f));
582 put_queue(kbd, 0x80 | (c & 0x3f));
583 }
584}
585
586/*
587 * We have a combining character DIACR here, followed by the character CH.
588 * If the combination occurs in the table, return the corresponding value.
589 * Otherwise, if CH is a space or equals DIACR, return DIACR.
590 * Otherwise, conclude that DIACR was not combining after all,
591 * queue it and return CH.
592 */
593static unsigned int handle_diacr(SDL_EVDEV_keyboard_state *kbd, unsigned int ch)
594{
595 unsigned int d = kbd->diacr;
596 unsigned int i;
597
598 kbd->diacr = 0;
599
600 if (kbd->console_fd >= 0)
601 if (ioctl(kbd->console_fd, KDGKBDIACR, kbd->accents) < 0) {
602 // No worries, we'll use the default accent table
603 }
604
605 for (i = 0; i < kbd->accents->kb_cnt; i++) {
606 if (kbd->accents->kbdiacr[i].diacr == d &&
607 kbd->accents->kbdiacr[i].base == ch) {
608 return kbd->accents->kbdiacr[i].result;
609 }
610 }
611
612 if (ch == ' ' || ch == d) {
613 return d;
614 }
615
616 put_utf8(kbd, d);
617
618 return ch;
619}
620
621static bool vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag)
622{
623 return (kbd->ledflagstate & flag) != 0;
624}
625
626static void set_vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag)
627{
628 kbd->ledflagstate |= flag;
629 ioctl(kbd->console_fd, KDSETLED, (unsigned long)(kbd->ledflagstate));
630}
631
632static void clr_vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag)
633{
634 kbd->ledflagstate &= ~flag;
635 ioctl(kbd->console_fd, KDSETLED, (unsigned long)(kbd->ledflagstate));
636}
637
638static void chg_vc_kbd_lock(SDL_EVDEV_keyboard_state *kbd, int flag)
639{
640 kbd->lockstate ^= 1 << flag;
641}
642
643static void chg_vc_kbd_slock(SDL_EVDEV_keyboard_state *kbd, int flag)
644{
645 kbd->slockstate ^= 1 << flag;
646}
647
648static void chg_vc_kbd_led(SDL_EVDEV_keyboard_state *kbd, int flag)
649{
650 kbd->ledflagstate ^= flag;
651 ioctl(kbd->console_fd, KDSETLED, (unsigned long)(kbd->ledflagstate));
652}
653
654/*
655 * Special function handlers
656 */
657
658static void fn_enter(SDL_EVDEV_keyboard_state *kbd)
659{
660 if (kbd->diacr) {
661 put_utf8(kbd, kbd->diacr);
662 kbd->diacr = 0;
663 }
664}
665
666static void fn_caps_toggle(SDL_EVDEV_keyboard_state *kbd)
667{
668 if (kbd->rep) {
669 return;
670 }
671
672 chg_vc_kbd_led(kbd, K_CAPSLOCK);
673}
674
675static void fn_caps_on(SDL_EVDEV_keyboard_state *kbd)
676{
677 if (kbd->rep) {
678 return;
679 }
680
681 set_vc_kbd_led(kbd, K_CAPSLOCK);
682}
683
684static void fn_num(SDL_EVDEV_keyboard_state *kbd)
685{
686 if (!kbd->rep) {
687 chg_vc_kbd_led(kbd, K_NUMLOCK);
688 }
689}
690
691static void fn_compose(SDL_EVDEV_keyboard_state *kbd)
692{
693 kbd->dead_key_next = true;
694}
695
696/*
697 * Special key handlers
698 */
699
700static void k_ignore(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
701{
702}
703
704static void k_spec(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
705{
706 if (up_flag) {
707 return;
708 }
709 if (value >= SDL_arraysize(fn_handler)) {
710 return;
711 }
712 if (fn_handler[value]) {
713 fn_handler[value](kbd);
714 }
715}
716
717static void k_lowercase(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
718{
719}
720
721static void k_self(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
722{
723 if (up_flag) {
724 return; // no action, if this is a key release
725 }
726
727 if (kbd->diacr) {
728 value = handle_diacr(kbd, value);
729 }
730
731 if (kbd->dead_key_next) {
732 kbd->dead_key_next = false;
733 kbd->diacr = value;
734 return;
735 }
736 put_utf8(kbd, value);
737}
738
739static void k_deadunicode(SDL_EVDEV_keyboard_state *kbd, unsigned int value, char up_flag)
740{
741 if (up_flag) {
742 return;
743 }
744
745 kbd->diacr = (kbd->diacr ? handle_diacr(kbd, value) : value);
746}
747
748static void k_dead(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
749{
750 const unsigned char ret_diacr[NR_DEAD] = { '`', '\'', '^', '~', '"', ',' };
751
752 k_deadunicode(kbd, ret_diacr[value], up_flag);
753}
754
755static void k_dead2(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
756{
757 k_deadunicode(kbd, value, up_flag);
758}
759
760static void k_cons(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
761{
762}
763
764static void k_fn(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
765{
766}
767
768static void k_cur(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
769{
770}
771
772static void k_pad(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
773{
774 static const char pad_chars[] = "0123456789+-*/\015,.?()#";
775
776 if (up_flag) {
777 return; // no action, if this is a key release
778 }
779
780 if (!vc_kbd_led(kbd, K_NUMLOCK)) {
781 // unprintable action
782 return;
783 }
784
785 put_queue(kbd, pad_chars[value]);
786}
787
788static void k_shift(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
789{
790 int old_state = kbd->shift_state;
791
792 if (kbd->rep) {
793 return;
794 }
795 /*
796 * Mimic typewriter:
797 * a CapsShift key acts like Shift but undoes CapsLock
798 */
799 if (value == KVAL(K_CAPSSHIFT)) {
800 value = KVAL(K_SHIFT);
801 if (!up_flag) {
802 clr_vc_kbd_led(kbd, K_CAPSLOCK);
803 }
804 }
805
806 if (up_flag) {
807 /*
808 * handle the case that two shift or control
809 * keys are depressed simultaneously
810 */
811 if (kbd->shift_down[value]) {
812 kbd->shift_down[value]--;
813 }
814 } else {
815 kbd->shift_down[value]++;
816 }
817
818 if (kbd->shift_down[value]) {
819 kbd->shift_state |= (1 << value);
820 } else {
821 kbd->shift_state &= ~(1 << value);
822 }
823
824 // kludge
825 if (up_flag && kbd->shift_state != old_state && kbd->npadch != -1) {
826 put_utf8(kbd, kbd->npadch);
827 kbd->npadch = -1;
828 }
829}
830
831static void k_meta(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
832{
833}
834
835static void k_ascii(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
836{
837 int base;
838
839 if (up_flag) {
840 return;
841 }
842
843 if (value < 10) {
844 // decimal input of code, while Alt depressed
845 base = 10;
846 } else {
847 // hexadecimal input of code, while AltGr depressed
848 value -= 10;
849 base = 16;
850 }
851
852 if (kbd->npadch == -1) {
853 kbd->npadch = value;
854 } else {
855 kbd->npadch = kbd->npadch * base + value;
856 }
857}
858
859static void k_lock(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
860{
861 if (up_flag || kbd->rep) {
862 return;
863 }
864
865 chg_vc_kbd_lock(kbd, value);
866}
867
868static void k_slock(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
869{
870 k_shift(kbd, value, up_flag);
871 if (up_flag || kbd->rep) {
872 return;
873 }
874
875 chg_vc_kbd_slock(kbd, value);
876 // try to make Alt, oops, AltGr and such work
877 if (!kbd->key_maps[kbd->lockstate ^ kbd->slockstate]) {
878 kbd->slockstate = 0;
879 chg_vc_kbd_slock(kbd, value);
880 }
881}
882
883static void k_brl(SDL_EVDEV_keyboard_state *kbd, unsigned char value, char up_flag)
884{
885}
886
887void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *state, unsigned int keycode, int down)
888{
889 unsigned char shift_final;
890 unsigned char type;
891 unsigned short *key_map;
892 unsigned short keysym;
893
894 if (!state) {
895 return;
896 }
897
898 state->rep = (down == 2);
899
900 shift_final = (state->shift_state | state->slockstate) ^ state->lockstate;
901 key_map = state->key_maps[shift_final];
902 if (!key_map) {
903 // Unsupported shift state (e.g. ctrl = 4, alt = 8), just reset to the default state
904 state->shift_state = 0;
905 state->slockstate = 0;
906 state->lockstate = 0;
907 return;
908 }
909
910 if (keycode < NR_KEYS) {
911 if (state->console_fd < 0) {
912 keysym = key_map[keycode];
913 } else {
914 struct kbentry kbe;
915 kbe.kb_table = shift_final;
916 kbe.kb_index = keycode;
917 if (ioctl(state->console_fd, KDGKBENT, &kbe) == 0)
918 keysym = (kbe.kb_value ^ 0xf000);
919 else
920 return;
921 }
922 } else {
923 return;
924 }
925
926 type = KTYP(keysym);
927
928 if (type < 0xf0) {
929 if (down) {
930 put_utf8(state, keysym);
931 }
932 } else {
933 type -= 0xf0;
934
935 // if type is KT_LETTER then it can be affected by Caps Lock
936 if (type == KT_LETTER) {
937 type = KT_LATIN;
938
939 if (vc_kbd_led(state, K_CAPSLOCK)) {
940 shift_final = shift_final ^ (1 << KG_SHIFT);
941 key_map = state->key_maps[shift_final];
942 if (key_map) {
943 if (state->console_fd < 0) {
944 keysym = key_map[keycode];
945 } else {
946 struct kbentry kbe;
947 kbe.kb_table = shift_final;
948 kbe.kb_index = keycode;
949 if (ioctl(state->console_fd, KDGKBENT, &kbe) == 0)
950 keysym = (kbe.kb_value ^ 0xf000);
951 }
952 }
953 }
954 }
955
956 (*k_handler[type])(state, keysym & 0xff, !down);
957
958 if (type != KT_SLOCK) {
959 state->slockstate = 0;
960 }
961 }
962
963 if (state->text_len > 0) {
964 state->text[state->text_len] = '\0';
965 SDL_SendKeyboardText(state->text);
966 state->text_len = 0;
967 }
968}
969
970#elif !defined(SDL_INPUT_FBSDKBIO) // !SDL_INPUT_LINUXKD
971
972SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void)
973{
974 return NULL;
975}
976
977void SDL_EVDEV_kbd_set_muted(SDL_EVDEV_keyboard_state *state, bool muted)
978{
979}
980
981void SDL_EVDEV_kbd_set_vt_switch_callbacks(SDL_EVDEV_keyboard_state *state, void (*release_callback)(void*), void *release_callback_data, void (*acquire_callback)(void*), void *acquire_callback_data)
982{
983}
984
985void SDL_EVDEV_kbd_update(SDL_EVDEV_keyboard_state *state)
986{
987}
988
989void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *state, unsigned int keycode, int down)
990{
991}
992
993void SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *state)
994{
995}
996
997#endif // SDL_INPUT_LINUXKD
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd.h b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd.h
new file mode 100644
index 0000000..6ea19fb
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd.h
@@ -0,0 +1,35 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_evdev_kbd_h_
23#define SDL_evdev_kbd_h_
24
25struct SDL_EVDEV_keyboard_state;
26typedef struct SDL_EVDEV_keyboard_state SDL_EVDEV_keyboard_state;
27
28extern SDL_EVDEV_keyboard_state *SDL_EVDEV_kbd_init(void);
29extern void SDL_EVDEV_kbd_set_muted(SDL_EVDEV_keyboard_state *state, bool muted);
30extern void SDL_EVDEV_kbd_set_vt_switch_callbacks(SDL_EVDEV_keyboard_state *state, void (*release_callback)(void*), void *release_callback_data, void (*acquire_callback)(void*), void *acquire_callback_data);
31extern void SDL_EVDEV_kbd_update(SDL_EVDEV_keyboard_state *state);
32extern void SDL_EVDEV_kbd_keycode(SDL_EVDEV_keyboard_state *state, unsigned int keycode, int down);
33extern void SDL_EVDEV_kbd_quit(SDL_EVDEV_keyboard_state *state);
34
35#endif // SDL_evdev_kbd_h_
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd_default_accents.h b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd_default_accents.h
new file mode 100644
index 0000000..b6d034c
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd_default_accents.h
@@ -0,0 +1,282 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22static struct kbdiacrs default_accents = {
23 68,
24 {
25 { 0x60, 0x41, 0xc0 },
26 { 0x60, 0x61, 0xe0 },
27 { 0x27, 0x41, 0xc1 },
28 { 0x27, 0x61, 0xe1 },
29 { 0x5e, 0x41, 0xc2 },
30 { 0x5e, 0x61, 0xe2 },
31 { 0x7e, 0x41, 0xc3 },
32 { 0x7e, 0x61, 0xe3 },
33 { 0x22, 0x41, 0xc4 },
34 { 0x22, 0x61, 0xe4 },
35 { 0x4f, 0x41, 0xc5 },
36 { 0x6f, 0x61, 0xe5 },
37 { 0x30, 0x41, 0xc5 },
38 { 0x30, 0x61, 0xe5 },
39 { 0x41, 0x41, 0xc5 },
40 { 0x61, 0x61, 0xe5 },
41 { 0x41, 0x45, 0xc6 },
42 { 0x61, 0x65, 0xe6 },
43 { 0x2c, 0x43, 0xc7 },
44 { 0x2c, 0x63, 0xe7 },
45 { 0x60, 0x45, 0xc8 },
46 { 0x60, 0x65, 0xe8 },
47 { 0x27, 0x45, 0xc9 },
48 { 0x27, 0x65, 0xe9 },
49 { 0x5e, 0x45, 0xca },
50 { 0x5e, 0x65, 0xea },
51 { 0x22, 0x45, 0xcb },
52 { 0x22, 0x65, 0xeb },
53 { 0x60, 0x49, 0xcc },
54 { 0x60, 0x69, 0xec },
55 { 0x27, 0x49, 0xcd },
56 { 0x27, 0x69, 0xed },
57 { 0x5e, 0x49, 0xce },
58 { 0x5e, 0x69, 0xee },
59 { 0x22, 0x49, 0xcf },
60 { 0x22, 0x69, 0xef },
61 { 0x2d, 0x44, 0xd0 },
62 { 0x2d, 0x64, 0xf0 },
63 { 0x7e, 0x4e, 0xd1 },
64 { 0x7e, 0x6e, 0xf1 },
65 { 0x60, 0x4f, 0xd2 },
66 { 0x60, 0x6f, 0xf2 },
67 { 0x27, 0x4f, 0xd3 },
68 { 0x27, 0x6f, 0xf3 },
69 { 0x5e, 0x4f, 0xd4 },
70 { 0x5e, 0x6f, 0xf4 },
71 { 0x7e, 0x4f, 0xd5 },
72 { 0x7e, 0x6f, 0xf5 },
73 { 0x22, 0x4f, 0xd6 },
74 { 0x22, 0x6f, 0xf6 },
75 { 0x2f, 0x4f, 0xd8 },
76 { 0x2f, 0x6f, 0xf8 },
77 { 0x60, 0x55, 0xd9 },
78 { 0x60, 0x75, 0xf9 },
79 { 0x27, 0x55, 0xda },
80 { 0x27, 0x75, 0xfa },
81 { 0x5e, 0x55, 0xdb },
82 { 0x5e, 0x75, 0xfb },
83 { 0x22, 0x55, 0xdc },
84 { 0x22, 0x75, 0xfc },
85 { 0x27, 0x59, 0xdd },
86 { 0x27, 0x79, 0xfd },
87 { 0x54, 0x48, 0xde },
88 { 0x74, 0x68, 0xfe },
89 { 0x73, 0x73, 0xdf },
90 { 0x22, 0x79, 0xff },
91 { 0x73, 0x7a, 0xdf },
92 { 0x69, 0x6a, 0xff },
93 { 0x00, 0x00, 0x00 },
94 { 0x00, 0x00, 0x00 },
95 { 0x00, 0x00, 0x00 },
96 { 0x00, 0x00, 0x00 },
97 { 0x00, 0x00, 0x00 },
98 { 0x00, 0x00, 0x00 },
99 { 0x00, 0x00, 0x00 },
100 { 0x00, 0x00, 0x00 },
101 { 0x00, 0x00, 0x00 },
102 { 0x00, 0x00, 0x00 },
103 { 0x00, 0x00, 0x00 },
104 { 0x00, 0x00, 0x00 },
105 { 0x00, 0x00, 0x00 },
106 { 0x00, 0x00, 0x00 },
107 { 0x00, 0x00, 0x00 },
108 { 0x00, 0x00, 0x00 },
109 { 0x00, 0x00, 0x00 },
110 { 0x00, 0x00, 0x00 },
111 { 0x00, 0x00, 0x00 },
112 { 0x00, 0x00, 0x00 },
113 { 0x00, 0x00, 0x00 },
114 { 0x00, 0x00, 0x00 },
115 { 0x00, 0x00, 0x00 },
116 { 0x00, 0x00, 0x00 },
117 { 0x00, 0x00, 0x00 },
118 { 0x00, 0x00, 0x00 },
119 { 0x00, 0x00, 0x00 },
120 { 0x00, 0x00, 0x00 },
121 { 0x00, 0x00, 0x00 },
122 { 0x00, 0x00, 0x00 },
123 { 0x00, 0x00, 0x00 },
124 { 0x00, 0x00, 0x00 },
125 { 0x00, 0x00, 0x00 },
126 { 0x00, 0x00, 0x00 },
127 { 0x00, 0x00, 0x00 },
128 { 0x00, 0x00, 0x00 },
129 { 0x00, 0x00, 0x00 },
130 { 0x00, 0x00, 0x00 },
131 { 0x00, 0x00, 0x00 },
132 { 0x00, 0x00, 0x00 },
133 { 0x00, 0x00, 0x00 },
134 { 0x00, 0x00, 0x00 },
135 { 0x00, 0x00, 0x00 },
136 { 0x00, 0x00, 0x00 },
137 { 0x00, 0x00, 0x00 },
138 { 0x00, 0x00, 0x00 },
139 { 0x00, 0x00, 0x00 },
140 { 0x00, 0x00, 0x00 },
141 { 0x00, 0x00, 0x00 },
142 { 0x00, 0x00, 0x00 },
143 { 0x00, 0x00, 0x00 },
144 { 0x00, 0x00, 0x00 },
145 { 0x00, 0x00, 0x00 },
146 { 0x00, 0x00, 0x00 },
147 { 0x00, 0x00, 0x00 },
148 { 0x00, 0x00, 0x00 },
149 { 0x00, 0x00, 0x00 },
150 { 0x00, 0x00, 0x00 },
151 { 0x00, 0x00, 0x00 },
152 { 0x00, 0x00, 0x00 },
153 { 0x00, 0x00, 0x00 },
154 { 0x00, 0x00, 0x00 },
155 { 0x00, 0x00, 0x00 },
156 { 0x00, 0x00, 0x00 },
157 { 0x00, 0x00, 0x00 },
158 { 0x00, 0x00, 0x00 },
159 { 0x00, 0x00, 0x00 },
160 { 0x00, 0x00, 0x00 },
161 { 0x00, 0x00, 0x00 },
162 { 0x00, 0x00, 0x00 },
163 { 0x00, 0x00, 0x00 },
164 { 0x00, 0x00, 0x00 },
165 { 0x00, 0x00, 0x00 },
166 { 0x00, 0x00, 0x00 },
167 { 0x00, 0x00, 0x00 },
168 { 0x00, 0x00, 0x00 },
169 { 0x00, 0x00, 0x00 },
170 { 0x00, 0x00, 0x00 },
171 { 0x00, 0x00, 0x00 },
172 { 0x00, 0x00, 0x00 },
173 { 0x00, 0x00, 0x00 },
174 { 0x00, 0x00, 0x00 },
175 { 0x00, 0x00, 0x00 },
176 { 0x00, 0x00, 0x00 },
177 { 0x00, 0x00, 0x00 },
178 { 0x00, 0x00, 0x00 },
179 { 0x00, 0x00, 0x00 },
180 { 0x00, 0x00, 0x00 },
181 { 0x00, 0x00, 0x00 },
182 { 0x00, 0x00, 0x00 },
183 { 0x00, 0x00, 0x00 },
184 { 0x00, 0x00, 0x00 },
185 { 0x00, 0x00, 0x00 },
186 { 0x00, 0x00, 0x00 },
187 { 0x00, 0x00, 0x00 },
188 { 0x00, 0x00, 0x00 },
189 { 0x00, 0x00, 0x00 },
190 { 0x00, 0x00, 0x00 },
191 { 0x00, 0x00, 0x00 },
192 { 0x00, 0x00, 0x00 },
193 { 0x00, 0x00, 0x00 },
194 { 0x00, 0x00, 0x00 },
195 { 0x00, 0x00, 0x00 },
196 { 0x00, 0x00, 0x00 },
197 { 0x00, 0x00, 0x00 },
198 { 0x00, 0x00, 0x00 },
199 { 0x00, 0x00, 0x00 },
200 { 0x00, 0x00, 0x00 },
201 { 0x00, 0x00, 0x00 },
202 { 0x00, 0x00, 0x00 },
203 { 0x00, 0x00, 0x00 },
204 { 0x00, 0x00, 0x00 },
205 { 0x00, 0x00, 0x00 },
206 { 0x00, 0x00, 0x00 },
207 { 0x00, 0x00, 0x00 },
208 { 0x00, 0x00, 0x00 },
209 { 0x00, 0x00, 0x00 },
210 { 0x00, 0x00, 0x00 },
211 { 0x00, 0x00, 0x00 },
212 { 0x00, 0x00, 0x00 },
213 { 0x00, 0x00, 0x00 },
214 { 0x00, 0x00, 0x00 },
215 { 0x00, 0x00, 0x00 },
216 { 0x00, 0x00, 0x00 },
217 { 0x00, 0x00, 0x00 },
218 { 0x00, 0x00, 0x00 },
219 { 0x00, 0x00, 0x00 },
220 { 0x00, 0x00, 0x00 },
221 { 0x00, 0x00, 0x00 },
222 { 0x00, 0x00, 0x00 },
223 { 0x00, 0x00, 0x00 },
224 { 0x00, 0x00, 0x00 },
225 { 0x00, 0x00, 0x00 },
226 { 0x00, 0x00, 0x00 },
227 { 0x00, 0x00, 0x00 },
228 { 0x00, 0x00, 0x00 },
229 { 0x00, 0x00, 0x00 },
230 { 0x00, 0x00, 0x00 },
231 { 0x00, 0x00, 0x00 },
232 { 0x00, 0x00, 0x00 },
233 { 0x00, 0x00, 0x00 },
234 { 0x00, 0x00, 0x00 },
235 { 0x00, 0x00, 0x00 },
236 { 0x00, 0x00, 0x00 },
237 { 0x00, 0x00, 0x00 },
238 { 0x00, 0x00, 0x00 },
239 { 0x00, 0x00, 0x00 },
240 { 0x00, 0x00, 0x00 },
241 { 0x00, 0x00, 0x00 },
242 { 0x00, 0x00, 0x00 },
243 { 0x00, 0x00, 0x00 },
244 { 0x00, 0x00, 0x00 },
245 { 0x00, 0x00, 0x00 },
246 { 0x00, 0x00, 0x00 },
247 { 0x00, 0x00, 0x00 },
248 { 0x00, 0x00, 0x00 },
249 { 0x00, 0x00, 0x00 },
250 { 0x00, 0x00, 0x00 },
251 { 0x00, 0x00, 0x00 },
252 { 0x00, 0x00, 0x00 },
253 { 0x00, 0x00, 0x00 },
254 { 0x00, 0x00, 0x00 },
255 { 0x00, 0x00, 0x00 },
256 { 0x00, 0x00, 0x00 },
257 { 0x00, 0x00, 0x00 },
258 { 0x00, 0x00, 0x00 },
259 { 0x00, 0x00, 0x00 },
260 { 0x00, 0x00, 0x00 },
261 { 0x00, 0x00, 0x00 },
262 { 0x00, 0x00, 0x00 },
263 { 0x00, 0x00, 0x00 },
264 { 0x00, 0x00, 0x00 },
265 { 0x00, 0x00, 0x00 },
266 { 0x00, 0x00, 0x00 },
267 { 0x00, 0x00, 0x00 },
268 { 0x00, 0x00, 0x00 },
269 { 0x00, 0x00, 0x00 },
270 { 0x00, 0x00, 0x00 },
271 { 0x00, 0x00, 0x00 },
272 { 0x00, 0x00, 0x00 },
273 { 0x00, 0x00, 0x00 },
274 { 0x00, 0x00, 0x00 },
275 { 0x00, 0x00, 0x00 },
276 { 0x00, 0x00, 0x00 },
277 { 0x00, 0x00, 0x00 },
278 { 0x00, 0x00, 0x00 },
279 { 0x00, 0x00, 0x00 },
280 { 0x00, 0x00, 0x00 },
281 }
282};
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd_default_keymap.h b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd_default_keymap.h
new file mode 100644
index 0000000..0529454
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_evdev_kbd_default_keymap.h
@@ -0,0 +1,4765 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22/* *INDENT-OFF* */ /* clang-format off */
23
24static unsigned short default_key_map_0[NR_KEYS] = {
25 0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
26 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
27 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
28 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73,
29 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b,
30 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
31 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c,
32 0xf703, 0xf020, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
33 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
34 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
35 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
36 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
37 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
38 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
39 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d,
40 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
41 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
42 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
43 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
44 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
45 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
46 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
47 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
48 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
49 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
50 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
51 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
52 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
53 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
54 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
55 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
56 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
57};
58static unsigned short default_key_map_1[NR_KEYS] = {
59 0xf200, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
60 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
61 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
62 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53,
63 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a,
64 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
65 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
66 0xf703, 0xf020, 0xfa06, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110,
67 0xf111, 0xf112, 0xf113, 0xf11e, 0xf11f, 0xf208, 0xf203, 0xf307,
68 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
69 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf120,
70 0xf121, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
71 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
72 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
73 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d,
74 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
75 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
76 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
77 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
78 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
79 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
80 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
81 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
82 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
83 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
84 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
85 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
86 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
87 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
88 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
89 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
90 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
91};
92static unsigned short default_key_map_2[NR_KEYS] = {
93 0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
94 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
95 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
96 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73,
97 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b,
98 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
99 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf916,
100 0xf703, 0xf020, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
101 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf202, 0xf911,
102 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
103 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516,
104 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
105 0xf919, 0xf702, 0xf915, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
106 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
107 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d,
108 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
109 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
110 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
111 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
112 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
113 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
114 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
115 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
116 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
117 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
118 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
119 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
120 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
121 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
122 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
123 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
124 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
125};
126static unsigned short default_key_map_3[NR_KEYS] = {
127 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
128 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
129 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
130 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53,
131 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a,
132 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
133 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
134 0xf703, 0xf020, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
135 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
136 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
137 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0x00a6, 0xf522,
138 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
139 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
140 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
141 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
142 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
143 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
144 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
145 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
146 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
147 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
148 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
149 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
150 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
151 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
152 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
153 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
154 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
155 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
156 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
157 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
158 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
159};
160#ifdef INCLUDE_EXTENDED_KEYMAP
161static unsigned short default_key_map_4[NR_KEYS] = {
162 0xf200, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
163 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
164 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
165 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
166 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
167 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
168 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
169 0xf703, 0xf000, 0xfa06, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126,
170 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf208, 0xf204, 0xf307,
171 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
172 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf12c,
173 0xf12d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
174 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
175 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
176 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf205,
177 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
178 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
179 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
180 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
181 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
182 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
183 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
184 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
185 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
186 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
187 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
188 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
189 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
190 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
191 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
192 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
193 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
194};
195static unsigned short default_key_map_5[NR_KEYS] = {
196 0xf200, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
197 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
198 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
199 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
200 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
201 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
202 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
203 0xf703, 0xf000, 0xfa06, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132,
204 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, 0xf208, 0xf209, 0xf307,
205 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
206 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf138,
207 0xf139, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
208 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
209 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
210 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf205,
211 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
212 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
213 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
214 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
215 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
216 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
217 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
218 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
219 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
220 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
221 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
222 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
223 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
224 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
225 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
226 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
227 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
228};
229static unsigned short default_key_map_6[NR_KEYS] = {
230 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
231 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
232 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
233 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
234 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
235 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
236 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
237 0xf703, 0xf000, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
238 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
239 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
240 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf01c, 0xf516,
241 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
242 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
243 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
244 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
245 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
246 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
247 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
248 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
249 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
250 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
251 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
252 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
253 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
254 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
255 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
256 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
257 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
258 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
259 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
260 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
261 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
262};
263static unsigned short default_key_map_7[NR_KEYS] = {
264 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
265 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
266 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
267 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
268 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
269 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
270 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
271 0xf703, 0xf000, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
272 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
273 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
274 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf522,
275 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
276 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
277 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
278 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
279 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
280 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
281 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
282 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
283 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
284 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
285 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
286 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
287 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
288 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
289 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
290 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
291 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
292 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
293 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
294 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
295 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
296};
297static unsigned short default_key_map_8[NR_KEYS] = {
298 0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
299 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
300 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
301 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
302 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
303 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
304 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
305 0xf703, 0xf820, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
306 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf202, 0xf907,
307 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901,
308 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a,
309 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
310 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf212,
311 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
312 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d,
313 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
314 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
315 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
316 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
317 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
318 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
319 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
320 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
321 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
322 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
323 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
324 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
325 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
326 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
327 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
328 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
329 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
330};
331static unsigned short default_key_map_9[NR_KEYS] = {
332 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
333 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
334 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
335 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
336 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
337 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
338 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf916,
339 0xf703, 0xf820, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
340 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf209, 0xf911,
341 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
342 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf83e, 0xf516,
343 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
344 0xf919, 0xf702, 0xf915, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
345 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
346 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
347 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
348 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
349 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
350 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
351 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
352 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
353 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
354 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
355 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
356 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
357 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
358 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
359 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
360 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
361 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
362 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
363 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
364};
365static unsigned short default_key_map_10[NR_KEYS] = {
366 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
367 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
368 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
369 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
370 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
371 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
372 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
373 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
374 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
375 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
376 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
377 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
378 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
379 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
380 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
381 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
382 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
383 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
384 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
385 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
386 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
387 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
388 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
389 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
390 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
391 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
392 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
393 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
394 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
395 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
396 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
397 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
398};
399static unsigned short default_key_map_11[NR_KEYS] = {
400 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
401 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
402 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
403 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
404 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
405 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
406 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf30c,
407 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
408 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
409 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
410 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
411 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
412 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
413 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
414 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
415 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
416 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
417 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
418 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
419 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
420 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
421 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
422 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
423 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
424 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
425 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
426 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
427 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
428 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
429 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
430 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
431 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
432};
433static unsigned short default_key_map_12[NR_KEYS] = {
434 0xf200, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
435 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
436 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
437 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
438 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
439 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
440 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
441 0xf703, 0xf800, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
442 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf307,
443 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
444 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf50a,
445 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
446 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
447 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
448 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d,
449 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
450 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
451 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
452 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
453 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
454 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
455 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
456 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
457 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
458 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
459 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
460 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
461 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
462 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
463 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
464 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
465 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
466};
467static unsigned short default_key_map_13[NR_KEYS] = {
468 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
469 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
470 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
471 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
472 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
473 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
474 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
475 0xf703, 0xf800, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
476 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
477 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
478 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf516,
479 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
480 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
481 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
482 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
483 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
484 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
485 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
486 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
487 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
488 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
489 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
490 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
491 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
492 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
493 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
494 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
495 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
496 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
497 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
498 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
499 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
500};
501static unsigned short default_key_map_14[NR_KEYS] = {
502 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
503 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
504 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
505 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
506 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
507 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
508 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
509 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
510 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
511 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
512 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf10a,
513 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
514 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
515 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
516 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
517 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
518 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
519 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
520 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
521 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
522 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
523 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
524 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
525 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
526 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
527 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
528 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
529 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
530 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
531 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
532 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
533 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
534};
535static unsigned short default_key_map_15[NR_KEYS] = {
536 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
537 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
538 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
539 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
540 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
541 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
542 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
543 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
544 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
545 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
546 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf10a,
547 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
548 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
549 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
550 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
551 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
552 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
553 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
554 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
555 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
556 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
557 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
558 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
559 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
560 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
561 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
562 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
563 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
564 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
565 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
566 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
567 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
568};
569static unsigned short default_key_map_16[NR_KEYS] = {
570 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
571 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
572 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
573 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73,
574 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b,
575 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
576 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c,
577 0xf703, 0xf020, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
578 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
579 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
580 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
581 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
582 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
583 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
584 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
585 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
586 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
587 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
588 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
589 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
590 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
591 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
592 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
593 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
594 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
595 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
596 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
597 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
598 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
599 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
600 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
601 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
602};
603static unsigned short default_key_map_17[NR_KEYS] = {
604 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
605 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
606 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
607 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53,
608 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a,
609 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
610 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
611 0xf703, 0xf020, 0xfa06, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110,
612 0xf111, 0xf112, 0xf113, 0xf11e, 0xf11f, 0xf208, 0xf203, 0xf307,
613 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
614 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf120,
615 0xf121, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
616 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
617 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
618 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
619 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
620 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
621 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
622 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
623 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
624 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
625 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
626 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
627 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
628 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
629 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
630 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
631 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
632 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
633 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
634 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
635 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
636};
637static unsigned short default_key_map_18[NR_KEYS] = {
638 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
639 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
640 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
641 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73,
642 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b,
643 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
644 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf916,
645 0xf703, 0xf020, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
646 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf202, 0xf911,
647 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
648 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516,
649 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
650 0xf919, 0xf702, 0xf915, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
651 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
652 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
653 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
654 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
655 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
656 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
657 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
658 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
659 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
660 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
661 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
662 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
663 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
664 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
665 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
666 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
667 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
668 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
669 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
670};
671static unsigned short default_key_map_19[NR_KEYS] = {
672 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
673 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
674 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
675 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53,
676 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a,
677 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
678 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
679 0xf703, 0xf020, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
680 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
681 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
682 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0x00a6, 0xf522,
683 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
684 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
685 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
686 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
687 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
688 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
689 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
690 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
691 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
692 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
693 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
694 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
695 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
696 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
697 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
698 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
699 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
700 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
701 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
702 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
703 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
704};
705static unsigned short default_key_map_20[NR_KEYS] = {
706 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
707 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
708 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
709 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
710 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
711 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
712 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
713 0xf703, 0xf000, 0xfa06, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126,
714 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf208, 0xf204, 0xf307,
715 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
716 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf12c,
717 0xf12d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
718 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
719 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
720 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
721 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
722 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
723 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
724 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
725 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
726 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
727 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
728 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
729 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
730 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
731 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
732 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
733 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
734 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
735 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
736 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
737 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
738};
739static unsigned short default_key_map_21[NR_KEYS] = {
740 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
741 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
742 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
743 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
744 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
745 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
746 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
747 0xf703, 0xf000, 0xfa06, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132,
748 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, 0xf208, 0xf209, 0xf307,
749 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
750 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf138,
751 0xf139, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
752 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
753 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
754 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
755 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
756 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
757 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
758 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
759 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
760 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
761 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
762 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
763 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
764 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
765 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
766 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
767 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
768 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
769 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
770 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
771 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
772};
773static unsigned short default_key_map_22[NR_KEYS] = {
774 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
775 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
776 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
777 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
778 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
779 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
780 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
781 0xf703, 0xf000, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
782 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
783 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
784 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf01c, 0xf516,
785 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
786 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
787 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
788 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
789 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
790 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
791 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
792 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
793 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
794 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
795 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
796 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
797 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
798 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
799 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
800 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
801 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
802 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
803 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
804 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
805 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
806};
807static unsigned short default_key_map_23[NR_KEYS] = {
808 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
809 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
810 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
811 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
812 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
813 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
814 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
815 0xf703, 0xf000, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
816 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
817 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
818 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf522,
819 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
820 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
821 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
822 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
823 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
824 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
825 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
826 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
827 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
828 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
829 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
830 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
831 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
832 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
833 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
834 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
835 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
836 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
837 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
838 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
839 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
840};
841static unsigned short default_key_map_24[NR_KEYS] = {
842 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
843 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
844 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
845 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
846 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
847 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
848 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
849 0xf703, 0xf820, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
850 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf202, 0xf907,
851 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901,
852 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a,
853 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
854 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf212,
855 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
856 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
857 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
858 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
859 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
860 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
861 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
862 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
863 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
864 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
865 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
866 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
867 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
868 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
869 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
870 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
871 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
872 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
873 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
874};
875static unsigned short default_key_map_25[NR_KEYS] = {
876 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
877 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
878 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
879 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
880 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
881 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
882 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf916,
883 0xf703, 0xf820, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
884 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf209, 0xf911,
885 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
886 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf83e, 0xf516,
887 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
888 0xf919, 0xf702, 0xf915, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
889 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
890 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
891 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
892 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
893 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
894 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
895 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
896 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
897 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
898 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
899 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
900 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
901 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
902 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
903 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
904 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
905 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
906 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
907 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
908};
909static unsigned short default_key_map_26[NR_KEYS] = {
910 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
911 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
912 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
913 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
914 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
915 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
916 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
917 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
918 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
919 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
920 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
921 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
922 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
923 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
924 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
925 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
926 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
927 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
928 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
929 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
930 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
931 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
932 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
933 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
934 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
935 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
936 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
937 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
938 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
939 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
940 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
941 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
942};
943static unsigned short default_key_map_27[NR_KEYS] = {
944 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
945 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
946 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
947 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
948 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
949 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
950 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf30c,
951 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
952 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
953 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
954 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
955 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
956 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
957 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
958 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
959 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
960 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
961 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
962 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
963 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
964 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
965 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
966 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
967 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
968 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
969 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
970 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
971 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
972 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
973 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
974 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
975 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
976};
977static unsigned short default_key_map_28[NR_KEYS] = {
978 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
979 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
980 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
981 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
982 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
983 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
984 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
985 0xf703, 0xf800, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
986 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf307,
987 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
988 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf50a,
989 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
990 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
991 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
992 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
993 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
994 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
995 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
996 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
997 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
998 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
999 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1000 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1001 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1002 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1003 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1004 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1005 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1006 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1007 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1008 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1009 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1010};
1011static unsigned short default_key_map_29[NR_KEYS] = {
1012 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
1013 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
1014 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
1015 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
1016 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
1017 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
1018 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
1019 0xf703, 0xf800, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
1020 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
1021 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1022 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf516,
1023 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1024 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
1025 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1026 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1027 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1028 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1029 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1030 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1031 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1032 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1033 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1034 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1035 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1036 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1037 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1038 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1039 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1040 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1041 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1042 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1043 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1044};
1045static unsigned short default_key_map_30[NR_KEYS] = {
1046 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
1047 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
1048 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
1049 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
1050 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
1051 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
1052 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
1053 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1054 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
1055 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1056 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf10a,
1057 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1058 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
1059 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
1060 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1061 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1062 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1063 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1064 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1065 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1066 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1067 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1068 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1069 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1070 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1071 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1072 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1073 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1074 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1075 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1076 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1077 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1078};
1079static unsigned short default_key_map_31[NR_KEYS] = {
1080 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
1081 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
1082 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
1083 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
1084 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
1085 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
1086 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
1087 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1088 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
1089 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1090 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf10a,
1091 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1092 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
1093 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1094 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1095 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1096 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1097 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1098 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1099 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1100 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1101 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1102 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1103 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1104 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1105 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1106 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1107 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1108 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1109 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1110 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1111 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1112};
1113static unsigned short default_key_map_32[NR_KEYS] = {
1114 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
1115 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
1116 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
1117 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73,
1118 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b,
1119 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
1120 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c,
1121 0xf703, 0xf020, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1122 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
1123 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1124 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
1125 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1126 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
1127 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1128 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1129 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1130 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1131 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1132 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1133 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1134 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1135 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1136 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1137 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1138 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1139 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1140 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1141 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1142 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1143 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1144 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1145 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1146};
1147static unsigned short default_key_map_33[NR_KEYS] = {
1148 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
1149 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
1150 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
1151 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53,
1152 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a,
1153 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
1154 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
1155 0xf703, 0xf020, 0xfa06, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110,
1156 0xf111, 0xf112, 0xf113, 0xf11e, 0xf11f, 0xf208, 0xf203, 0xf307,
1157 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1158 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf120,
1159 0xf121, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1160 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
1161 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
1162 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1163 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1164 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1165 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1166 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1167 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1168 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1169 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1170 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1171 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1172 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1173 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1174 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1175 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1176 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1177 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1178 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1179 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1180};
1181static unsigned short default_key_map_34[NR_KEYS] = {
1182 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
1183 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
1184 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
1185 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73,
1186 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b,
1187 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
1188 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf916,
1189 0xf703, 0xf020, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
1190 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf202, 0xf911,
1191 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
1192 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516,
1193 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1194 0xf919, 0xf702, 0xf915, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1195 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1196 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1197 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1198 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1199 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1200 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1201 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1202 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1203 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1204 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1205 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1206 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1207 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1208 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1209 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1210 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1211 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1212 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1213 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1214};
1215static unsigned short default_key_map_35[NR_KEYS] = {
1216 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
1217 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
1218 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
1219 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53,
1220 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a,
1221 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
1222 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
1223 0xf703, 0xf020, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
1224 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
1225 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1226 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0x00a6, 0xf522,
1227 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1228 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1229 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1230 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1231 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1232 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1233 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1234 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1235 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1236 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1237 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1238 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1239 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1240 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1241 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1242 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1243 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1244 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1245 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1246 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1247 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1248};
1249static unsigned short default_key_map_36[NR_KEYS] = {
1250 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
1251 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
1252 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
1253 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
1254 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
1255 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
1256 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
1257 0xf703, 0xf000, 0xfa06, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126,
1258 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf208, 0xf204, 0xf307,
1259 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1260 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf12c,
1261 0xf12d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1262 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1263 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1264 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
1265 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1266 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1267 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1268 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1269 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1270 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1271 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1272 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1273 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1274 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1275 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1276 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1277 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1278 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1279 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1280 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1281 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1282};
1283static unsigned short default_key_map_37[NR_KEYS] = {
1284 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
1285 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
1286 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
1287 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
1288 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
1289 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
1290 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
1291 0xf703, 0xf000, 0xfa06, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132,
1292 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, 0xf208, 0xf209, 0xf307,
1293 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1294 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf138,
1295 0xf139, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1296 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1297 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1298 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
1299 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1300 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1301 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1302 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1303 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1304 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1305 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1306 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1307 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1308 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1309 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1310 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1311 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1312 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1313 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1314 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1315 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1316};
1317static unsigned short default_key_map_38[NR_KEYS] = {
1318 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
1319 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
1320 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
1321 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
1322 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
1323 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
1324 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
1325 0xf703, 0xf000, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
1326 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
1327 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1328 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf01c, 0xf516,
1329 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1330 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1331 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
1332 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
1333 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1334 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1335 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1336 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1337 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1338 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1339 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1340 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1341 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1342 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1343 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1344 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1345 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1346 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1347 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1348 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1349 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1350};
1351static unsigned short default_key_map_39[NR_KEYS] = {
1352 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
1353 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
1354 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
1355 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
1356 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
1357 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
1358 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
1359 0xf703, 0xf000, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
1360 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
1361 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1362 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf522,
1363 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1364 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1365 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1366 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
1367 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1368 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1369 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1370 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1371 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1372 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1373 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1374 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1375 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1376 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1377 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1378 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1379 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1380 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1381 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1382 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1383 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1384};
1385static unsigned short default_key_map_40[NR_KEYS] = {
1386 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
1387 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
1388 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
1389 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
1390 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
1391 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
1392 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
1393 0xf703, 0xf820, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
1394 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf202, 0xf907,
1395 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901,
1396 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a,
1397 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1398 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf212,
1399 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1400 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1401 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1402 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1403 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1404 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1405 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1406 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1407 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1408 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1409 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1410 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1411 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1412 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1413 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1414 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1415 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1416 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1417 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1418};
1419static unsigned short default_key_map_41[NR_KEYS] = {
1420 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
1421 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
1422 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
1423 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
1424 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
1425 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
1426 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf916,
1427 0xf703, 0xf820, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
1428 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf209, 0xf911,
1429 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
1430 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf83e, 0xf516,
1431 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1432 0xf919, 0xf702, 0xf915, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
1433 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1434 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1435 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1436 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1437 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1438 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1439 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1440 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1441 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1442 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1443 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1444 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1445 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1446 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1447 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1448 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1449 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1450 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1451 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1452};
1453static unsigned short default_key_map_42[NR_KEYS] = {
1454 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
1455 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
1456 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
1457 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
1458 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
1459 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
1460 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
1461 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1462 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
1463 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1464 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
1465 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1466 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
1467 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1468 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1469 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1470 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1471 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1472 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1473 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1474 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1475 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1476 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1477 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1478 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1479 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1480 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1481 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1482 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1483 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1484 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1485 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1486};
1487static unsigned short default_key_map_43[NR_KEYS] = {
1488 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
1489 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
1490 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
1491 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
1492 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
1493 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
1494 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf30c,
1495 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1496 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
1497 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1498 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
1499 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1500 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
1501 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1502 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1503 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1504 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1505 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1506 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1507 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1508 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1509 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1510 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1511 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1512 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1513 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1514 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1515 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1516 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1517 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1518 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1519 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1520};
1521static unsigned short default_key_map_44[NR_KEYS] = {
1522 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
1523 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
1524 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
1525 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
1526 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
1527 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
1528 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
1529 0xf703, 0xf800, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
1530 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf307,
1531 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1532 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf50a,
1533 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1534 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
1535 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
1536 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1537 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1538 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1539 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1540 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1541 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1542 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1543 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1544 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1545 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1546 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1547 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1548 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1549 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1550 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1551 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1552 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1553 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1554};
1555static unsigned short default_key_map_45[NR_KEYS] = {
1556 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
1557 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
1558 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
1559 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
1560 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
1561 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
1562 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
1563 0xf703, 0xf800, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
1564 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
1565 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1566 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf516,
1567 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1568 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
1569 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1570 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1571 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1572 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1573 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1574 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1575 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1576 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1577 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1578 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1579 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1580 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1581 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1582 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1583 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1584 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1585 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1586 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1587 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1588};
1589static unsigned short default_key_map_46[NR_KEYS] = {
1590 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
1591 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
1592 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
1593 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
1594 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
1595 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
1596 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
1597 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1598 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
1599 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1600 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf10a,
1601 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1602 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
1603 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
1604 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1605 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1606 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1607 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1608 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1609 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1610 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1611 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1612 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1613 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1614 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1615 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1616 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1617 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1618 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1619 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1620 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1621 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1622};
1623static unsigned short default_key_map_47[NR_KEYS] = {
1624 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
1625 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
1626 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
1627 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
1628 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
1629 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
1630 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
1631 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1632 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
1633 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1634 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf10a,
1635 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1636 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
1637 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1638 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1639 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1640 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1641 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1642 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1643 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1644 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1645 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1646 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1647 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1648 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1649 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1650 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1651 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1652 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1653 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1654 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1655 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1656};
1657static unsigned short default_key_map_48[NR_KEYS] = {
1658 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
1659 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
1660 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
1661 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73,
1662 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b,
1663 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
1664 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c,
1665 0xf703, 0xf020, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
1666 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
1667 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1668 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
1669 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1670 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
1671 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1672 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1673 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1674 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1675 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1676 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1677 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1678 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1679 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1680 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1681 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1682 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1683 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1684 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1685 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1686 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1687 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1688 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1689 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1690};
1691static unsigned short default_key_map_49[NR_KEYS] = {
1692 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
1693 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
1694 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
1695 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53,
1696 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a,
1697 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
1698 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
1699 0xf703, 0xf020, 0xfa06, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110,
1700 0xf111, 0xf112, 0xf113, 0xf11e, 0xf11f, 0xf208, 0xf203, 0xf307,
1701 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1702 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf120,
1703 0xf121, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1704 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
1705 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
1706 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1707 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1708 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1709 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1710 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1711 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1712 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1713 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1714 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1715 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1716 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1717 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1718 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1719 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1720 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1721 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1722 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1723 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1724};
1725static unsigned short default_key_map_50[NR_KEYS] = {
1726 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
1727 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
1728 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
1729 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73,
1730 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b,
1731 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
1732 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf916,
1733 0xf703, 0xf020, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
1734 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf202, 0xf911,
1735 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
1736 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516,
1737 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1738 0xf919, 0xf702, 0xf915, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1739 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1740 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1741 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1742 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1743 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1744 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1745 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1746 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1747 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1748 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1749 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1750 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1751 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1752 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1753 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1754 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1755 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1756 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1757 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1758};
1759static unsigned short default_key_map_51[NR_KEYS] = {
1760 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
1761 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
1762 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
1763 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53,
1764 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a,
1765 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
1766 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
1767 0xf703, 0xf020, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
1768 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
1769 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1770 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0x00a6, 0xf522,
1771 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1772 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1773 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1774 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1775 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1776 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1777 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1778 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1779 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1780 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1781 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1782 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1783 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1784 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1785 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1786 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1787 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1788 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1789 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1790 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1791 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1792};
1793static unsigned short default_key_map_52[NR_KEYS] = {
1794 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
1795 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
1796 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
1797 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
1798 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
1799 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
1800 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
1801 0xf703, 0xf000, 0xfa06, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126,
1802 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf208, 0xf204, 0xf307,
1803 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1804 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf12c,
1805 0xf12d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1806 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1807 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1808 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
1809 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1810 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1811 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1812 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1813 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1814 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1815 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1816 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1817 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1818 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1819 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1820 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1821 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1822 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1823 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1824 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1825 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1826};
1827static unsigned short default_key_map_53[NR_KEYS] = {
1828 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
1829 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
1830 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
1831 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
1832 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
1833 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
1834 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
1835 0xf703, 0xf000, 0xfa06, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132,
1836 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, 0xf208, 0xf209, 0xf307,
1837 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1838 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf138,
1839 0xf139, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1840 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1841 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1842 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
1843 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1844 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1845 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1846 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1847 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1848 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1849 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1850 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1851 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1852 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1853 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1854 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1855 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1856 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1857 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1858 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1859 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1860};
1861static unsigned short default_key_map_54[NR_KEYS] = {
1862 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
1863 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
1864 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
1865 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
1866 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
1867 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
1868 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
1869 0xf703, 0xf000, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
1870 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
1871 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1872 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf01c, 0xf516,
1873 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1874 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1875 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
1876 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
1877 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1878 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1879 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1880 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1881 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1882 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1883 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1884 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1885 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1886 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1887 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1888 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1889 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1890 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1891 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1892 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1893 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1894};
1895static unsigned short default_key_map_55[NR_KEYS] = {
1896 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
1897 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
1898 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
1899 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
1900 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
1901 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
1902 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
1903 0xf703, 0xf000, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
1904 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
1905 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
1906 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf522,
1907 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1908 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
1909 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1910 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
1911 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1912 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1913 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1914 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1915 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1916 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1917 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1918 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1919 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1920 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1921 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1922 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1923 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1924 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1925 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1926 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1927 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1928};
1929static unsigned short default_key_map_56[NR_KEYS] = {
1930 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
1931 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
1932 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
1933 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
1934 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
1935 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
1936 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
1937 0xf703, 0xf820, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
1938 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf202, 0xf907,
1939 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901,
1940 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a,
1941 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1942 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf212,
1943 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1944 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1945 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1946 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1947 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1948 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1949 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1950 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1951 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1952 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1953 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1954 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1955 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1956 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1957 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1958 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1959 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1960 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1961 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1962};
1963static unsigned short default_key_map_57[NR_KEYS] = {
1964 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
1965 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
1966 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
1967 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
1968 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
1969 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
1970 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf916,
1971 0xf703, 0xf820, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
1972 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf209, 0xf911,
1973 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
1974 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf83e, 0xf516,
1975 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1976 0xf919, 0xf702, 0xf915, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
1977 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
1978 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
1979 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
1980 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1981 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1982 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1983 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1984 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1985 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1986 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1987 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1988 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1989 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1990 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1991 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1992 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1993 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1994 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1995 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
1996};
1997static unsigned short default_key_map_58[NR_KEYS] = {
1998 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
1999 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
2000 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
2001 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
2002 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
2003 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
2004 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
2005 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2006 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2007 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2008 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
2009 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2010 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
2011 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2012 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2013 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2014 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2015 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2016 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2017 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2018 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2019 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2020 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2021 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2022 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2023 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2024 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2025 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2026 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2027 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2028 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2029 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2030};
2031static unsigned short default_key_map_59[NR_KEYS] = {
2032 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
2033 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
2034 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
2035 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
2036 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
2037 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
2038 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf30c,
2039 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2040 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2041 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2042 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
2043 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2044 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
2045 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2046 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2047 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2048 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2049 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2050 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2051 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2052 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2053 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2054 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2055 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2056 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2057 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2058 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2059 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2060 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2061 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2062 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2063 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2064};
2065static unsigned short default_key_map_60[NR_KEYS] = {
2066 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
2067 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
2068 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
2069 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
2070 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
2071 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
2072 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
2073 0xf703, 0xf800, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
2074 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf307,
2075 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2076 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf50a,
2077 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2078 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
2079 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
2080 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2081 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2082 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2083 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2084 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2085 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2086 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2087 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2088 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2089 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2090 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2091 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2092 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2093 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2094 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2095 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2096 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2097 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2098};
2099static unsigned short default_key_map_61[NR_KEYS] = {
2100 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
2101 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
2102 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
2103 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
2104 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
2105 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
2106 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
2107 0xf703, 0xf800, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
2108 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
2109 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2110 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf516,
2111 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2112 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
2113 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2114 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2115 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2116 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2117 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2118 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2119 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2120 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2121 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2122 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2123 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2124 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2125 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2126 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2127 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2128 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2129 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2130 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2131 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2132};
2133static unsigned short default_key_map_62[NR_KEYS] = {
2134 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
2135 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
2136 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
2137 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
2138 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
2139 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
2140 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
2141 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2142 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2143 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2144 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf10a,
2145 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2146 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
2147 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
2148 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2149 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2150 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2151 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2152 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2153 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2154 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2155 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2156 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2157 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2158 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2159 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2160 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2161 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2162 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2163 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2164 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2165 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2166};
2167static unsigned short default_key_map_63[NR_KEYS] = {
2168 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
2169 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
2170 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
2171 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
2172 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
2173 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
2174 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
2175 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2176 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2177 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2178 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf10a,
2179 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2180 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
2181 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2182 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2183 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2184 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2185 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2186 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2187 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2188 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2189 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2190 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2191 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2192 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2193 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2194 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2195 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2196 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2197 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2198 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2199 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2200};
2201static unsigned short default_key_map_64[NR_KEYS] = {
2202 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
2203 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
2204 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
2205 0xfb4f, 0xfb50, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb41, 0xfb53,
2206 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03b,
2207 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
2208 0xfb42, 0xfb4e, 0xfb4d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c,
2209 0xf703, 0xf020, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2210 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2211 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2212 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
2213 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2214 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
2215 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2216 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2217 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2218 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2219 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2220 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2221 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2222 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2223 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2224 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2225 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2226 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2227 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2228 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2229 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2230 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2231 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2232 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2233 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2234};
2235static unsigned short default_key_map_65[NR_KEYS] = {
2236 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
2237 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
2238 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
2239 0xfb6f, 0xfb70, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb61, 0xfb73,
2240 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03a,
2241 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
2242 0xfb62, 0xfb6e, 0xfb6d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
2243 0xf703, 0xf020, 0xfa06, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110,
2244 0xf111, 0xf112, 0xf113, 0xf11e, 0xf11f, 0xf208, 0xf203, 0xf307,
2245 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2246 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf120,
2247 0xf121, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2248 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
2249 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
2250 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2251 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2252 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2253 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2254 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2255 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2256 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2257 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2258 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2259 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2260 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2261 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2262 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2263 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2264 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2265 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2266 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2267 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2268};
2269static unsigned short default_key_map_66[NR_KEYS] = {
2270 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
2271 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
2272 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
2273 0xfb4f, 0xfb50, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb41, 0xfb53,
2274 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03b,
2275 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
2276 0xfb42, 0xfb4e, 0xfb4d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf916,
2277 0xf703, 0xf020, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
2278 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf202, 0xf911,
2279 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
2280 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516,
2281 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2282 0xf919, 0xf702, 0xf915, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2283 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2284 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2285 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2286 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2287 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2288 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2289 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2290 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2291 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2292 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2293 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2294 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2295 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2296 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2297 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2298 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2299 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2300 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2301 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2302};
2303static unsigned short default_key_map_67[NR_KEYS] = {
2304 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
2305 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
2306 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
2307 0xfb6f, 0xfb70, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb61, 0xfb73,
2308 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03a,
2309 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
2310 0xfb62, 0xfb6e, 0xfb6d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
2311 0xf703, 0xf020, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
2312 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
2313 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2314 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0x00a6, 0xf522,
2315 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2316 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2317 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2318 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2319 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2320 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2321 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2322 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2323 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2324 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2325 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2326 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2327 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2328 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2329 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2330 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2331 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2332 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2333 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2334 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2335 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2336};
2337static unsigned short default_key_map_68[NR_KEYS] = {
2338 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
2339 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
2340 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
2341 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
2342 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
2343 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
2344 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
2345 0xf703, 0xf000, 0xfa06, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126,
2346 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf208, 0xf204, 0xf307,
2347 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2348 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf12c,
2349 0xf12d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2350 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2351 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2352 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
2353 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2354 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2355 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2356 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2357 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2358 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2359 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2360 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2361 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2362 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2363 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2364 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2365 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2366 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2367 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2368 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2369 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2370};
2371static unsigned short default_key_map_69[NR_KEYS] = {
2372 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
2373 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
2374 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
2375 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
2376 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
2377 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
2378 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
2379 0xf703, 0xf000, 0xfa06, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132,
2380 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, 0xf208, 0xf209, 0xf307,
2381 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2382 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf138,
2383 0xf139, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2384 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2385 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2386 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
2387 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2388 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2389 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2390 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2391 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2392 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2393 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2394 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2395 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2396 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2397 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2398 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2399 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2400 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2401 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2402 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2403 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2404};
2405static unsigned short default_key_map_70[NR_KEYS] = {
2406 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
2407 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
2408 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
2409 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
2410 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
2411 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
2412 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
2413 0xf703, 0xf000, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
2414 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
2415 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2416 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf01c, 0xf516,
2417 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2418 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2419 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
2420 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
2421 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2422 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2423 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2424 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2425 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2426 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2427 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2428 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2429 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2430 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2431 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2432 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2433 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2434 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2435 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2436 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2437 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2438};
2439static unsigned short default_key_map_71[NR_KEYS] = {
2440 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
2441 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
2442 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
2443 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
2444 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
2445 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
2446 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
2447 0xf703, 0xf000, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
2448 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
2449 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2450 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf522,
2451 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2452 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2453 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2454 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
2455 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2456 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2457 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2458 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2459 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2460 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2461 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2462 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2463 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2464 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2465 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2466 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2467 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2468 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2469 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2470 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2471 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2472};
2473static unsigned short default_key_map_72[NR_KEYS] = {
2474 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
2475 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
2476 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
2477 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
2478 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
2479 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
2480 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
2481 0xf703, 0xf820, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
2482 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf202, 0xf907,
2483 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901,
2484 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a,
2485 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2486 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf212,
2487 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2488 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2489 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2490 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2491 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2492 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2493 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2494 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2495 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2496 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2497 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2498 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2499 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2500 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2501 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2502 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2503 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2504 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2505 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2506};
2507static unsigned short default_key_map_73[NR_KEYS] = {
2508 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
2509 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
2510 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
2511 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
2512 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
2513 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
2514 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf916,
2515 0xf703, 0xf820, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
2516 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf209, 0xf911,
2517 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
2518 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf83e, 0xf516,
2519 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2520 0xf919, 0xf702, 0xf915, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
2521 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2522 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2523 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2524 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2525 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2526 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2527 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2528 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2529 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2530 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2531 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2532 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2533 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2534 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2535 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2536 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2537 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2538 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2539 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2540};
2541static unsigned short default_key_map_74[NR_KEYS] = {
2542 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
2543 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
2544 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
2545 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
2546 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
2547 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
2548 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
2549 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2550 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2551 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2552 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
2553 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2554 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
2555 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2556 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2557 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2558 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2559 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2560 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2561 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2562 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2563 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2564 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2565 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2566 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2567 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2568 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2569 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2570 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2571 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2572 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2573 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2574};
2575static unsigned short default_key_map_75[NR_KEYS] = {
2576 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
2577 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
2578 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
2579 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
2580 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
2581 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
2582 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf30c,
2583 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2584 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2585 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2586 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
2587 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2588 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
2589 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2590 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2591 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2592 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2593 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2594 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2595 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2596 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2597 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2598 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2599 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2600 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2601 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2602 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2603 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2604 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2605 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2606 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2607 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2608};
2609static unsigned short default_key_map_76[NR_KEYS] = {
2610 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
2611 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
2612 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
2613 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
2614 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
2615 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
2616 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
2617 0xf703, 0xf800, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
2618 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf307,
2619 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2620 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf50a,
2621 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2622 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
2623 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
2624 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2625 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2626 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2627 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2628 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2629 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2630 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2631 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2632 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2633 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2634 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2635 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2636 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2637 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2638 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2639 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2640 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2641 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2642};
2643static unsigned short default_key_map_77[NR_KEYS] = {
2644 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
2645 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
2646 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
2647 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
2648 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
2649 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
2650 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
2651 0xf703, 0xf800, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
2652 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
2653 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2654 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf516,
2655 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2656 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
2657 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2658 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2659 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2660 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2661 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2662 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2663 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2664 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2665 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2666 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2667 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2668 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2669 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2670 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2671 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2672 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2673 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2674 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2675 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2676};
2677static unsigned short default_key_map_78[NR_KEYS] = {
2678 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
2679 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
2680 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
2681 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
2682 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
2683 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
2684 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
2685 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2686 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2687 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2688 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf10a,
2689 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2690 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
2691 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
2692 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2693 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2694 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2695 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2696 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2697 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2698 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2699 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2700 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2701 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2702 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2703 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2704 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2705 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2706 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2707 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2708 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2709 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2710};
2711static unsigned short default_key_map_79[NR_KEYS] = {
2712 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
2713 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
2714 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
2715 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
2716 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
2717 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
2718 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
2719 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2720 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2721 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2722 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf10a,
2723 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2724 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
2725 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2726 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2727 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2728 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2729 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2730 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2731 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2732 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2733 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2734 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2735 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2736 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2737 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2738 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2739 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2740 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2741 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2742 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2743 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2744};
2745static unsigned short default_key_map_80[NR_KEYS] = {
2746 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
2747 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
2748 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
2749 0xfb4f, 0xfb50, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb41, 0xfb53,
2750 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03b,
2751 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
2752 0xfb42, 0xfb4e, 0xfb4d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c,
2753 0xf703, 0xf020, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
2754 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
2755 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2756 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
2757 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2758 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
2759 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2760 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2761 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2762 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2763 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2764 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2765 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2766 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2767 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2768 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2769 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2770 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2771 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2772 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2773 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2774 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2775 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2776 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2777 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2778};
2779static unsigned short default_key_map_81[NR_KEYS] = {
2780 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
2781 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
2782 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
2783 0xfb6f, 0xfb70, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb61, 0xfb73,
2784 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03a,
2785 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
2786 0xfb62, 0xfb6e, 0xfb6d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
2787 0xf703, 0xf020, 0xfa06, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110,
2788 0xf111, 0xf112, 0xf113, 0xf11e, 0xf11f, 0xf208, 0xf203, 0xf307,
2789 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2790 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf120,
2791 0xf121, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2792 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
2793 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
2794 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2795 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2796 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2797 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2798 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2799 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2800 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2801 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2802 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2803 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2804 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2805 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2806 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2807 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2808 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2809 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2810 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2811 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2812};
2813static unsigned short default_key_map_82[NR_KEYS] = {
2814 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
2815 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
2816 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
2817 0xfb4f, 0xfb50, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb41, 0xfb53,
2818 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03b,
2819 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
2820 0xfb42, 0xfb4e, 0xfb4d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf916,
2821 0xf703, 0xf020, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
2822 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf202, 0xf911,
2823 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
2824 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516,
2825 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2826 0xf919, 0xf702, 0xf915, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2827 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2828 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2829 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2830 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2831 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2832 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2833 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2834 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2835 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2836 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2837 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2838 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2839 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2840 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2841 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2842 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2843 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2844 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2845 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2846};
2847static unsigned short default_key_map_83[NR_KEYS] = {
2848 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
2849 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
2850 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
2851 0xfb6f, 0xfb70, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb61, 0xfb73,
2852 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03a,
2853 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
2854 0xfb62, 0xfb6e, 0xfb6d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
2855 0xf703, 0xf020, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
2856 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
2857 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2858 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0x00a6, 0xf522,
2859 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2860 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2861 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2862 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
2863 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2864 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2865 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2866 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2867 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2868 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2869 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2870 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2871 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2872 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2873 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2874 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2875 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2876 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2877 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2878 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2879 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2880};
2881static unsigned short default_key_map_84[NR_KEYS] = {
2882 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
2883 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
2884 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
2885 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
2886 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
2887 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
2888 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
2889 0xf703, 0xf000, 0xfa06, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126,
2890 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf208, 0xf204, 0xf307,
2891 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2892 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf12c,
2893 0xf12d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2894 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2895 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2896 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
2897 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2898 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2899 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2900 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2901 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2902 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2903 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2904 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2905 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2906 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2907 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2908 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2909 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2910 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2911 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2912 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2913 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2914};
2915static unsigned short default_key_map_85[NR_KEYS] = {
2916 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
2917 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
2918 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
2919 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
2920 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
2921 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
2922 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
2923 0xf703, 0xf000, 0xfa06, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132,
2924 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, 0xf208, 0xf209, 0xf307,
2925 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2926 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf138,
2927 0xf139, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2928 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2929 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2930 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
2931 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2932 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2933 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2934 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2935 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2936 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2937 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2938 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2939 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2940 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2941 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2942 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2943 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2944 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2945 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2946 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2947 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2948};
2949static unsigned short default_key_map_86[NR_KEYS] = {
2950 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
2951 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
2952 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
2953 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
2954 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
2955 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
2956 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
2957 0xf703, 0xf000, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
2958 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
2959 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2960 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf01c, 0xf516,
2961 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2962 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2963 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
2964 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
2965 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
2966 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2967 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2968 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2969 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2970 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2971 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2972 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2973 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2974 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2975 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2976 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2977 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2978 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2979 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2980 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2981 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2982};
2983static unsigned short default_key_map_87[NR_KEYS] = {
2984 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
2985 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
2986 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
2987 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
2988 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
2989 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
2990 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
2991 0xf703, 0xf000, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
2992 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
2993 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
2994 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf522,
2995 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
2996 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
2997 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
2998 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
2999 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3000 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3001 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3002 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3003 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3004 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3005 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3006 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3007 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3008 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3009 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3010 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3011 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3012 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3013 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3014 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3015 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3016};
3017static unsigned short default_key_map_88[NR_KEYS] = {
3018 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
3019 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
3020 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
3021 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
3022 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
3023 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
3024 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
3025 0xf703, 0xf820, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
3026 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf202, 0xf907,
3027 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901,
3028 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a,
3029 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3030 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf212,
3031 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3032 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3033 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3034 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3035 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3036 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3037 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3038 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3039 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3040 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3041 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3042 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3043 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3044 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3045 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3046 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3047 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3048 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3049 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3050};
3051static unsigned short default_key_map_89[NR_KEYS] = {
3052 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
3053 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
3054 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
3055 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
3056 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
3057 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
3058 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf916,
3059 0xf703, 0xf820, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
3060 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf209, 0xf911,
3061 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
3062 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf83e, 0xf516,
3063 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3064 0xf919, 0xf702, 0xf915, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
3065 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3066 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3067 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3068 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3069 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3070 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3071 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3072 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3073 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3074 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3075 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3076 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3077 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3078 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3079 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3080 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3081 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3082 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3083 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3084};
3085static unsigned short default_key_map_90[NR_KEYS] = {
3086 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
3087 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
3088 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
3089 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
3090 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
3091 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
3092 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
3093 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3094 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3095 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3096 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
3097 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3098 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
3099 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3100 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3101 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3102 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3103 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3104 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3105 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3106 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3107 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3108 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3109 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3110 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3111 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3112 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3113 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3114 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3115 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3116 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3117 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3118};
3119static unsigned short default_key_map_91[NR_KEYS] = {
3120 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
3121 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
3122 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
3123 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
3124 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
3125 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
3126 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf30c,
3127 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3128 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3129 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3130 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
3131 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3132 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
3133 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3134 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3135 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3136 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3137 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3138 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3139 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3140 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3141 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3142 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3143 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3144 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3145 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3146 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3147 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3148 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3149 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3150 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3151 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3152};
3153static unsigned short default_key_map_92[NR_KEYS] = {
3154 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
3155 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
3156 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
3157 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
3158 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
3159 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
3160 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
3161 0xf703, 0xf800, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
3162 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf307,
3163 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3164 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf50a,
3165 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3166 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
3167 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
3168 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3169 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3170 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3171 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3172 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3173 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3174 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3175 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3176 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3177 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3178 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3179 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3180 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3181 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3182 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3183 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3184 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3185 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3186};
3187static unsigned short default_key_map_93[NR_KEYS] = {
3188 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
3189 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
3190 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
3191 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
3192 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
3193 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
3194 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
3195 0xf703, 0xf800, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
3196 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
3197 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3198 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf516,
3199 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3200 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
3201 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3202 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3203 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3204 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3205 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3206 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3207 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3208 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3209 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3210 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3211 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3212 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3213 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3214 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3215 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3216 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3217 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3218 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3219 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3220};
3221static unsigned short default_key_map_94[NR_KEYS] = {
3222 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
3223 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
3224 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
3225 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
3226 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
3227 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
3228 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
3229 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3230 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3231 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3232 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf10a,
3233 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3234 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
3235 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
3236 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3237 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3238 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3239 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3240 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3241 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3242 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3243 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3244 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3245 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3246 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3247 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3248 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3249 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3250 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3251 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3252 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3253 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3254};
3255static unsigned short default_key_map_95[NR_KEYS] = {
3256 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
3257 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
3258 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
3259 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
3260 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
3261 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
3262 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
3263 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3264 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3265 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3266 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf10a,
3267 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3268 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
3269 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3270 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3271 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3272 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3273 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3274 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3275 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3276 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3277 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3278 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3279 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3280 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3281 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3282 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3283 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3284 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3285 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3286 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3287 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3288};
3289static unsigned short default_key_map_96[NR_KEYS] = {
3290 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
3291 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
3292 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
3293 0xfb4f, 0xfb50, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb41, 0xfb53,
3294 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03b,
3295 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
3296 0xfb42, 0xfb4e, 0xfb4d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c,
3297 0xf703, 0xf020, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3298 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3299 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3300 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
3301 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3302 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
3303 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3304 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3305 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3306 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3307 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3308 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3309 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3310 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3311 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3312 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3313 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3314 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3315 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3316 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3317 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3318 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3319 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3320 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3321 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3322};
3323static unsigned short default_key_map_97[NR_KEYS] = {
3324 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
3325 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
3326 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
3327 0xfb6f, 0xfb70, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb61, 0xfb73,
3328 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03a,
3329 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
3330 0xfb62, 0xfb6e, 0xfb6d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
3331 0xf703, 0xf020, 0xfa06, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110,
3332 0xf111, 0xf112, 0xf113, 0xf11e, 0xf11f, 0xf208, 0xf203, 0xf307,
3333 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3334 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf120,
3335 0xf121, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3336 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
3337 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
3338 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3339 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3340 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3341 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3342 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3343 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3344 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3345 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3346 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3347 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3348 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3349 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3350 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3351 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3352 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3353 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3354 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3355 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3356};
3357static unsigned short default_key_map_98[NR_KEYS] = {
3358 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
3359 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
3360 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
3361 0xfb4f, 0xfb50, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb41, 0xfb53,
3362 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03b,
3363 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
3364 0xfb42, 0xfb4e, 0xfb4d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf916,
3365 0xf703, 0xf020, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
3366 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf202, 0xf911,
3367 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
3368 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516,
3369 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3370 0xf919, 0xf702, 0xf915, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3371 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3372 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3373 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3374 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3375 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3376 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3377 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3378 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3379 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3380 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3381 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3382 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3383 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3384 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3385 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3386 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3387 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3388 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3389 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3390};
3391static unsigned short default_key_map_99[NR_KEYS] = {
3392 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
3393 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
3394 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
3395 0xfb6f, 0xfb70, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb61, 0xfb73,
3396 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03a,
3397 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
3398 0xfb62, 0xfb6e, 0xfb6d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
3399 0xf703, 0xf020, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
3400 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
3401 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3402 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0x00a6, 0xf522,
3403 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3404 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3405 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3406 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3407 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3408 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3409 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3410 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3411 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3412 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3413 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3414 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3415 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3416 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3417 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3418 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3419 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3420 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3421 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3422 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3423 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3424};
3425static unsigned short default_key_map_100[NR_KEYS] = {
3426 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
3427 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
3428 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
3429 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
3430 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
3431 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
3432 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
3433 0xf703, 0xf000, 0xfa06, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126,
3434 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf208, 0xf204, 0xf307,
3435 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3436 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf12c,
3437 0xf12d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3438 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3439 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3440 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
3441 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3442 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3443 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3444 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3445 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3446 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3447 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3448 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3449 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3450 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3451 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3452 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3453 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3454 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3455 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3456 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3457 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3458};
3459static unsigned short default_key_map_101[NR_KEYS] = {
3460 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
3461 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
3462 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
3463 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
3464 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
3465 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
3466 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
3467 0xf703, 0xf000, 0xfa06, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132,
3468 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, 0xf208, 0xf209, 0xf307,
3469 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3470 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf138,
3471 0xf139, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3472 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3473 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3474 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
3475 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3476 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3477 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3478 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3479 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3480 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3481 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3482 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3483 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3484 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3485 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3486 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3487 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3488 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3489 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3490 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3491 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3492};
3493static unsigned short default_key_map_102[NR_KEYS] = {
3494 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
3495 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
3496 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
3497 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
3498 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
3499 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
3500 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
3501 0xf703, 0xf000, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
3502 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
3503 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3504 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf01c, 0xf516,
3505 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3506 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3507 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
3508 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
3509 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3510 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3511 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3512 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3513 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3514 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3515 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3516 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3517 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3518 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3519 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3520 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3521 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3522 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3523 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3524 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3525 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3526};
3527static unsigned short default_key_map_103[NR_KEYS] = {
3528 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
3529 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
3530 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
3531 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
3532 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
3533 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
3534 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
3535 0xf703, 0xf000, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
3536 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
3537 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3538 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf522,
3539 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3540 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3541 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3542 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
3543 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3544 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3545 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3546 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3547 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3548 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3549 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3550 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3551 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3552 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3553 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3554 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3555 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3556 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3557 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3558 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3559 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3560};
3561static unsigned short default_key_map_104[NR_KEYS] = {
3562 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
3563 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
3564 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
3565 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
3566 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
3567 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
3568 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
3569 0xf703, 0xf820, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
3570 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf202, 0xf907,
3571 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901,
3572 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a,
3573 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3574 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf212,
3575 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3576 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3577 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3578 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3579 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3580 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3581 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3582 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3583 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3584 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3585 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3586 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3587 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3588 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3589 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3590 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3591 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3592 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3593 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3594};
3595static unsigned short default_key_map_105[NR_KEYS] = {
3596 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
3597 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
3598 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
3599 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
3600 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
3601 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
3602 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf916,
3603 0xf703, 0xf820, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
3604 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf209, 0xf911,
3605 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
3606 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf83e, 0xf516,
3607 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3608 0xf919, 0xf702, 0xf915, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
3609 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3610 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3611 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3612 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3613 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3614 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3615 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3616 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3617 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3618 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3619 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3620 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3621 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3622 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3623 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3624 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3625 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3626 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3627 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3628};
3629static unsigned short default_key_map_106[NR_KEYS] = {
3630 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
3631 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
3632 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
3633 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
3634 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
3635 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
3636 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
3637 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3638 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3639 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3640 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
3641 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3642 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
3643 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3644 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3645 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3646 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3647 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3648 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3649 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3650 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3651 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3652 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3653 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3654 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3655 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3656 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3657 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3658 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3659 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3660 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3661 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3662};
3663static unsigned short default_key_map_107[NR_KEYS] = {
3664 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
3665 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
3666 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
3667 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
3668 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
3669 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
3670 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf30c,
3671 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3672 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3673 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3674 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
3675 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3676 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
3677 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3678 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3679 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3680 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3681 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3682 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3683 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3684 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3685 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3686 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3687 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3688 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3689 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3690 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3691 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3692 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3693 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3694 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3695 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3696};
3697static unsigned short default_key_map_108[NR_KEYS] = {
3698 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
3699 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
3700 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
3701 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
3702 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
3703 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
3704 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
3705 0xf703, 0xf800, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
3706 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf307,
3707 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3708 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf50a,
3709 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3710 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
3711 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
3712 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3713 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3714 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3715 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3716 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3717 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3718 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3719 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3720 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3721 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3722 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3723 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3724 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3725 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3726 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3727 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3728 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3729 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3730};
3731static unsigned short default_key_map_109[NR_KEYS] = {
3732 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
3733 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
3734 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
3735 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
3736 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
3737 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
3738 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
3739 0xf703, 0xf800, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
3740 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
3741 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3742 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf516,
3743 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3744 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
3745 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3746 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3747 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3748 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3749 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3750 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3751 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3752 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3753 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3754 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3755 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3756 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3757 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3758 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3759 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3760 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3761 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3762 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3763 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3764};
3765static unsigned short default_key_map_110[NR_KEYS] = {
3766 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
3767 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
3768 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
3769 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
3770 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
3771 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
3772 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
3773 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3774 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3775 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3776 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf10a,
3777 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3778 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
3779 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
3780 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3781 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3782 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3783 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3784 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3785 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3786 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3787 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3788 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3789 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3790 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3791 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3792 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3793 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3794 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3795 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3796 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3797 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3798};
3799static unsigned short default_key_map_111[NR_KEYS] = {
3800 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
3801 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
3802 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
3803 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
3804 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
3805 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
3806 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
3807 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3808 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3809 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3810 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf10a,
3811 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3812 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
3813 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3814 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3815 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3816 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3817 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3818 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3819 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3820 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3821 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3822 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3823 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3824 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3825 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3826 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3827 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3828 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3829 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3830 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3831 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3832};
3833static unsigned short default_key_map_112[NR_KEYS] = {
3834 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
3835 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
3836 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
3837 0xfb4f, 0xfb50, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb41, 0xfb53,
3838 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03b,
3839 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
3840 0xfb42, 0xfb4e, 0xfb4d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c,
3841 0xf703, 0xf020, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
3842 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
3843 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3844 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03c, 0xf10a,
3845 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3846 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
3847 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3848 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3849 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3850 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3851 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3852 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3853 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3854 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3855 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3856 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3857 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3858 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3859 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3860 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3861 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3862 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3863 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3864 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3865 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3866};
3867static unsigned short default_key_map_113[NR_KEYS] = {
3868 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
3869 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
3870 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
3871 0xfb6f, 0xfb70, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb61, 0xfb73,
3872 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03a,
3873 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
3874 0xfb62, 0xfb6e, 0xfb6d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
3875 0xf703, 0xf020, 0xfa06, 0xf10c, 0xf10d, 0xf10e, 0xf10f, 0xf110,
3876 0xf111, 0xf112, 0xf113, 0xf11e, 0xf11f, 0xf208, 0xf203, 0xf307,
3877 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3878 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf120,
3879 0xf121, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3880 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf703, 0xf205, 0xf114, 0xf603,
3881 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116,
3882 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3883 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3884 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3885 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3886 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3887 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3888 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3889 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3890 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3891 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3892 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3893 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3894 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3895 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3896 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3897 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3898 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3899 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3900};
3901static unsigned short default_key_map_114[NR_KEYS] = {
3902 0xf27e, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036,
3903 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009,
3904 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49,
3905 0xfb4f, 0xfb50, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb41, 0xfb53,
3906 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03b,
3907 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56,
3908 0xfb42, 0xfb4e, 0xfb4d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf916,
3909 0xf703, 0xf020, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
3910 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf202, 0xf911,
3911 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
3912 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516,
3913 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3914 0xf919, 0xf702, 0xf915, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3915 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3916 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3917 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3918 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3919 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3920 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3921 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3922 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3923 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3924 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3925 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3926 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3927 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3928 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3929 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3930 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3931 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3932 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3933 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3934};
3935static unsigned short default_key_map_115[NR_KEYS] = {
3936 0xf27e, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e,
3937 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009,
3938 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69,
3939 0xfb6f, 0xfb70, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb61, 0xfb73,
3940 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03a,
3941 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76,
3942 0xfb62, 0xfb6e, 0xfb6d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c,
3943 0xf703, 0xf020, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
3944 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
3945 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3946 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0x00a6, 0xf522,
3947 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3948 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3949 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3950 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
3951 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3952 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3953 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3954 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3955 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3956 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3957 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3958 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3959 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3960 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3961 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3962 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3963 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3964 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3965 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3966 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3967 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3968};
3969static unsigned short default_key_map_116[NR_KEYS] = {
3970 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
3971 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
3972 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
3973 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
3974 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
3975 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
3976 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
3977 0xf703, 0xf000, 0xfa06, 0xf122, 0xf123, 0xf124, 0xf125, 0xf126,
3978 0xf127, 0xf128, 0xf129, 0xf12a, 0xf12b, 0xf208, 0xf204, 0xf307,
3979 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
3980 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf12c,
3981 0xf12d, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3982 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
3983 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
3984 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
3985 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
3986 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3987 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3988 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3989 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3990 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3991 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3992 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3993 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3994 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3995 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3996 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3997 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3998 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
3999 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4000 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4001 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4002};
4003static unsigned short default_key_map_117[NR_KEYS] = {
4004 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
4005 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
4006 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
4007 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
4008 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
4009 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
4010 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
4011 0xf703, 0xf000, 0xfa06, 0xf12e, 0xf12f, 0xf130, 0xf131, 0xf132,
4012 0xf133, 0xf134, 0xf135, 0xf136, 0xf137, 0xf208, 0xf209, 0xf307,
4013 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4014 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf138,
4015 0xf139, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4016 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
4017 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
4018 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
4019 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4020 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4021 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4022 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4023 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4024 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4025 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4026 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4027 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4028 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4029 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4030 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4031 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4032 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4033 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4034 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4035 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4036};
4037static unsigned short default_key_map_118[NR_KEYS] = {
4038 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
4039 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
4040 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
4041 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
4042 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
4043 0xf200, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
4044 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
4045 0xf703, 0xf000, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
4046 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
4047 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4048 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf01c, 0xf516,
4049 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4050 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
4051 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
4052 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
4053 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4054 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4055 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4056 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4057 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4058 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4059 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4060 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4061 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4062 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4063 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4064 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4065 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4066 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4067 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4068 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4069 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4070};
4071static unsigned short default_key_map_119[NR_KEYS] = {
4072 0xf27e, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
4073 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
4074 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009,
4075 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf00d, 0xf702, 0xf001, 0xf013,
4076 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200,
4077 0xf200, 0xf01e, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016,
4078 0xf002, 0xf00e, 0xf201, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c,
4079 0xf703, 0xf000, 0xfa06, 0xf518, 0xf519, 0xf51a, 0xf51b, 0xf51c,
4080 0xf51d, 0xf51e, 0xf51f, 0xf520, 0xf521, 0xf208, 0xf209, 0xf307,
4081 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4082 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf01c, 0xf522,
4083 0xf523, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4084 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf703, 0xf205, 0xf114, 0xf603,
4085 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
4086 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf205,
4087 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4088 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4089 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4090 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4091 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4092 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4093 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4094 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4095 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4096 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4097 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4098 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4099 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4100 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4101 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4102 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4103 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4104};
4105static unsigned short default_key_map_120[NR_KEYS] = {
4106 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
4107 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
4108 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
4109 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
4110 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
4111 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
4112 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
4113 0xf703, 0xf820, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
4114 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf202, 0xf907,
4115 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901,
4116 0xf902, 0xf903, 0xf900, 0xf310, 0xf206, 0xf200, 0xf83c, 0xf50a,
4117 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4118 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf212,
4119 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
4120 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
4121 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4122 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4123 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4124 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4125 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4126 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4127 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4128 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4129 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4130 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4131 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4132 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4133 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4134 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4135 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4136 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4137 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4138};
4139static unsigned short default_key_map_121[NR_KEYS] = {
4140 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
4141 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
4142 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
4143 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
4144 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
4145 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
4146 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf916,
4147 0xf703, 0xf820, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
4148 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf914, 0xf209, 0xf911,
4149 0xf912, 0xf913, 0xf917, 0xf90e, 0xf90f, 0xf910, 0xf918, 0xf90b,
4150 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf83e, 0xf516,
4151 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4152 0xf919, 0xf702, 0xf915, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
4153 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
4154 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
4155 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4156 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4157 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4158 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4159 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4160 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4161 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4162 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4163 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4164 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4165 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4166 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4167 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4168 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4169 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4170 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4171 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4172};
4173static unsigned short default_key_map_122[NR_KEYS] = {
4174 0xf27e, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836,
4175 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809,
4176 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869,
4177 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873,
4178 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b,
4179 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876,
4180 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c,
4181 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
4182 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
4183 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4184 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
4185 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4186 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
4187 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
4188 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
4189 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4190 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4191 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4192 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4193 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4194 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4195 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4196 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4197 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4198 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4199 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4200 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4201 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4202 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4203 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4204 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4205 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4206};
4207static unsigned short default_key_map_123[NR_KEYS] = {
4208 0xf27e, 0xf81b, 0xf821, 0xf840, 0xf823, 0xf824, 0xf825, 0xf85e,
4209 0xf826, 0xf82a, 0xf828, 0xf829, 0xf85f, 0xf82b, 0xf87f, 0xf809,
4210 0xf851, 0xf857, 0xf845, 0xf852, 0xf854, 0xf859, 0xf855, 0xf849,
4211 0xf84f, 0xf850, 0xf87b, 0xf87d, 0xf80d, 0xf702, 0xf841, 0xf853,
4212 0xf844, 0xf846, 0xf847, 0xf848, 0xf84a, 0xf84b, 0xf84c, 0xf83a,
4213 0xf822, 0xf87e, 0xf700, 0xf87c, 0xf85a, 0xf858, 0xf843, 0xf856,
4214 0xf842, 0xf84e, 0xf84d, 0xf83c, 0xf83e, 0xf83f, 0xf700, 0xf30c,
4215 0xf703, 0xf820, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
4216 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
4217 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4218 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf87c, 0xf10a,
4219 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4220 0xf30e, 0xf702, 0xf30d, 0xf206, 0xf703, 0xf205, 0xf114, 0xf603,
4221 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
4222 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
4223 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4224 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4225 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4226 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4227 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4228 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4229 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4230 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4231 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4232 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4233 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4234 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4235 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4236 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4237 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4238 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4239 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4240};
4241static unsigned short default_key_map_124[NR_KEYS] = {
4242 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
4243 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
4244 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
4245 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
4246 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
4247 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
4248 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
4249 0xf703, 0xf800, 0xfa06, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504,
4250 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf307,
4251 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4252 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf50a,
4253 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4254 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
4255 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
4256 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
4257 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4258 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4259 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4260 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4261 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4262 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4263 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4264 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4265 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4266 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4267 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4268 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4269 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4270 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4271 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4272 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4273 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4274};
4275static unsigned short default_key_map_125[NR_KEYS] = {
4276 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
4277 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
4278 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
4279 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
4280 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
4281 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
4282 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
4283 0xf703, 0xf800, 0xfa06, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510,
4284 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf209, 0xf307,
4285 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4286 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf516,
4287 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4288 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
4289 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
4290 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
4291 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4292 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4293 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4294 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4295 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4296 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4297 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4298 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4299 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4300 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4301 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4302 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4303 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4304 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4305 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4306 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4307 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4308};
4309static unsigned short default_key_map_126[NR_KEYS] = {
4310 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
4311 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
4312 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
4313 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
4314 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
4315 0xf200, 0xf800, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
4316 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
4317 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
4318 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
4319 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4320 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf81c, 0xf10a,
4321 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4322 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
4323 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c,
4324 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
4325 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4326 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4327 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4328 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4329 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4330 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4331 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4332 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4333 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4334 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4335 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4336 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4337 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4338 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4339 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4340 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4341 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4342};
4343static unsigned short default_key_map_127[NR_KEYS] = {
4344 0xf27e, 0xf81b, 0xf200, 0xf800, 0xf200, 0xf200, 0xf200, 0xf81e,
4345 0xf200, 0xf200, 0xf200, 0xf200, 0xf81f, 0xf200, 0xf808, 0xf809,
4346 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809,
4347 0xf80f, 0xf810, 0xf81b, 0xf81d, 0xf80d, 0xf702, 0xf801, 0xf813,
4348 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200,
4349 0xf200, 0xf81e, 0xf700, 0xf81c, 0xf81a, 0xf818, 0xf803, 0xf816,
4350 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf20e, 0xf87f, 0xf700, 0xf30c,
4351 0xf703, 0xf800, 0xfa06, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104,
4352 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307,
4353 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301,
4354 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf81c, 0xf10a,
4355 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4356 0xf30e, 0xf702, 0xf30d, 0xf81c, 0xf703, 0xf205, 0xf114, 0xf603,
4357 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116,
4358 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf11d,
4359 0xf200, 0xf310, 0xf200, 0xf200, 0xf200, 0xf703, 0xf703, 0xf200,
4360 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4361 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4362 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4363 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4364 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4365 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4366 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4367 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4368 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4369 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4370 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4371 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4372 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4373 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4374 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4375 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
4376};
4377#endif /* INCLUDE_EXTENDED_KEYMAP */
4378
4379/* *INDENT-ON* */ /* clang-format on */
4380
4381static unsigned short *default_key_maps[MAX_NR_KEYMAPS] = {
4382 default_key_map_0,
4383 default_key_map_1,
4384 default_key_map_2,
4385 default_key_map_3,
4386#ifdef INCLUDE_EXTENDED_KEYMAP
4387 default_key_map_4,
4388 default_key_map_5,
4389 default_key_map_6,
4390 default_key_map_7,
4391 default_key_map_8,
4392 default_key_map_9,
4393 default_key_map_10,
4394 default_key_map_11,
4395 default_key_map_12,
4396 default_key_map_13,
4397 default_key_map_14,
4398 default_key_map_15,
4399 default_key_map_16,
4400 default_key_map_17,
4401 default_key_map_18,
4402 default_key_map_19,
4403 default_key_map_20,
4404 default_key_map_21,
4405 default_key_map_22,
4406 default_key_map_23,
4407 default_key_map_24,
4408 default_key_map_25,
4409 default_key_map_26,
4410 default_key_map_27,
4411 default_key_map_28,
4412 default_key_map_29,
4413 default_key_map_30,
4414 default_key_map_31,
4415 default_key_map_32,
4416 default_key_map_33,
4417 default_key_map_34,
4418 default_key_map_35,
4419 default_key_map_36,
4420 default_key_map_37,
4421 default_key_map_38,
4422 default_key_map_39,
4423 default_key_map_40,
4424 default_key_map_41,
4425 default_key_map_42,
4426 default_key_map_43,
4427 default_key_map_44,
4428 default_key_map_45,
4429 default_key_map_46,
4430 default_key_map_47,
4431 default_key_map_48,
4432 default_key_map_49,
4433 default_key_map_50,
4434 default_key_map_51,
4435 default_key_map_52,
4436 default_key_map_53,
4437 default_key_map_54,
4438 default_key_map_55,
4439 default_key_map_56,
4440 default_key_map_57,
4441 default_key_map_58,
4442 default_key_map_59,
4443 default_key_map_60,
4444 default_key_map_61,
4445 default_key_map_62,
4446 default_key_map_63,
4447 default_key_map_64,
4448 default_key_map_65,
4449 default_key_map_66,
4450 default_key_map_67,
4451 default_key_map_68,
4452 default_key_map_69,
4453 default_key_map_70,
4454 default_key_map_71,
4455 default_key_map_72,
4456 default_key_map_73,
4457 default_key_map_74,
4458 default_key_map_75,
4459 default_key_map_76,
4460 default_key_map_77,
4461 default_key_map_78,
4462 default_key_map_79,
4463 default_key_map_80,
4464 default_key_map_81,
4465 default_key_map_82,
4466 default_key_map_83,
4467 default_key_map_84,
4468 default_key_map_85,
4469 default_key_map_86,
4470 default_key_map_87,
4471 default_key_map_88,
4472 default_key_map_89,
4473 default_key_map_90,
4474 default_key_map_91,
4475 default_key_map_92,
4476 default_key_map_93,
4477 default_key_map_94,
4478 default_key_map_95,
4479 default_key_map_96,
4480 default_key_map_97,
4481 default_key_map_98,
4482 default_key_map_99,
4483 default_key_map_100,
4484 default_key_map_101,
4485 default_key_map_102,
4486 default_key_map_103,
4487 default_key_map_104,
4488 default_key_map_105,
4489 default_key_map_106,
4490 default_key_map_107,
4491 default_key_map_108,
4492 default_key_map_109,
4493 default_key_map_110,
4494 default_key_map_111,
4495 default_key_map_112,
4496 default_key_map_113,
4497 default_key_map_114,
4498 default_key_map_115,
4499 default_key_map_116,
4500 default_key_map_117,
4501 default_key_map_118,
4502 default_key_map_119,
4503 default_key_map_120,
4504 default_key_map_121,
4505 default_key_map_122,
4506 default_key_map_123,
4507 default_key_map_124,
4508 default_key_map_125,
4509 default_key_map_126,
4510 default_key_map_127,
4511#else /* !INCLUDE_EXTENDED_KEYMAP */
4512 NULL,
4513 NULL,
4514 NULL,
4515 NULL,
4516 NULL,
4517 NULL,
4518 NULL,
4519 NULL,
4520 NULL,
4521 NULL,
4522 NULL,
4523 NULL,
4524 NULL,
4525 NULL,
4526 NULL,
4527 NULL,
4528 NULL,
4529 NULL,
4530 NULL,
4531 NULL,
4532 NULL,
4533 NULL,
4534 NULL,
4535 NULL,
4536 NULL,
4537 NULL,
4538 NULL,
4539 NULL,
4540 NULL,
4541 NULL,
4542 NULL,
4543 NULL,
4544 NULL,
4545 NULL,
4546 NULL,
4547 NULL,
4548 NULL,
4549 NULL,
4550 NULL,
4551 NULL,
4552 NULL,
4553 NULL,
4554 NULL,
4555 NULL,
4556 NULL,
4557 NULL,
4558 NULL,
4559 NULL,
4560 NULL,
4561 NULL,
4562 NULL,
4563 NULL,
4564 NULL,
4565 NULL,
4566 NULL,
4567 NULL,
4568 NULL,
4569 NULL,
4570 NULL,
4571 NULL,
4572 NULL,
4573 NULL,
4574 NULL,
4575 NULL,
4576 NULL,
4577 NULL,
4578 NULL,
4579 NULL,
4580 NULL,
4581 NULL,
4582 NULL,
4583 NULL,
4584 NULL,
4585 NULL,
4586 NULL,
4587 NULL,
4588 NULL,
4589 NULL,
4590 NULL,
4591 NULL,
4592 NULL,
4593 NULL,
4594 NULL,
4595 NULL,
4596 NULL,
4597 NULL,
4598 NULL,
4599 NULL,
4600 NULL,
4601 NULL,
4602 NULL,
4603 NULL,
4604 NULL,
4605 NULL,
4606 NULL,
4607 NULL,
4608 NULL,
4609 NULL,
4610 NULL,
4611 NULL,
4612 NULL,
4613 NULL,
4614 NULL,
4615 NULL,
4616 NULL,
4617 NULL,
4618 NULL,
4619 NULL,
4620 NULL,
4621 NULL,
4622 NULL,
4623 NULL,
4624 NULL,
4625 NULL,
4626 NULL,
4627 NULL,
4628 NULL,
4629 NULL,
4630 NULL,
4631 NULL,
4632 NULL,
4633 NULL,
4634 NULL,
4635 NULL,
4636#endif /* INCLUDE_EXTENDED_KEYMAP */
4637 NULL,
4638 NULL,
4639 NULL,
4640 NULL,
4641 NULL,
4642 NULL,
4643 NULL,
4644 NULL,
4645 NULL,
4646 NULL,
4647 NULL,
4648 NULL,
4649 NULL,
4650 NULL,
4651 NULL,
4652 NULL,
4653 NULL,
4654 NULL,
4655 NULL,
4656 NULL,
4657 NULL,
4658 NULL,
4659 NULL,
4660 NULL,
4661 NULL,
4662 NULL,
4663 NULL,
4664 NULL,
4665 NULL,
4666 NULL,
4667 NULL,
4668 NULL,
4669 NULL,
4670 NULL,
4671 NULL,
4672 NULL,
4673 NULL,
4674 NULL,
4675 NULL,
4676 NULL,
4677 NULL,
4678 NULL,
4679 NULL,
4680 NULL,
4681 NULL,
4682 NULL,
4683 NULL,
4684 NULL,
4685 NULL,
4686 NULL,
4687 NULL,
4688 NULL,
4689 NULL,
4690 NULL,
4691 NULL,
4692 NULL,
4693 NULL,
4694 NULL,
4695 NULL,
4696 NULL,
4697 NULL,
4698 NULL,
4699 NULL,
4700 NULL,
4701 NULL,
4702 NULL,
4703 NULL,
4704 NULL,
4705 NULL,
4706 NULL,
4707 NULL,
4708 NULL,
4709 NULL,
4710 NULL,
4711 NULL,
4712 NULL,
4713 NULL,
4714 NULL,
4715 NULL,
4716 NULL,
4717 NULL,
4718 NULL,
4719 NULL,
4720 NULL,
4721 NULL,
4722 NULL,
4723 NULL,
4724 NULL,
4725 NULL,
4726 NULL,
4727 NULL,
4728 NULL,
4729 NULL,
4730 NULL,
4731 NULL,
4732 NULL,
4733 NULL,
4734 NULL,
4735 NULL,
4736 NULL,
4737 NULL,
4738 NULL,
4739 NULL,
4740 NULL,
4741 NULL,
4742 NULL,
4743 NULL,
4744 NULL,
4745 NULL,
4746 NULL,
4747 NULL,
4748 NULL,
4749 NULL,
4750 NULL,
4751 NULL,
4752 NULL,
4753 NULL,
4754 NULL,
4755 NULL,
4756 NULL,
4757 NULL,
4758 NULL,
4759 NULL,
4760 NULL,
4761 NULL,
4762 NULL,
4763 NULL,
4764 NULL,
4765};
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_fcitx.c b/contrib/SDL-3.2.8/src/core/linux/SDL_fcitx.c
new file mode 100644
index 0000000..d7a9ed6
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_fcitx.c
@@ -0,0 +1,460 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23#include <unistd.h>
24
25#include "SDL_fcitx.h"
26#include "../../video/SDL_sysvideo.h"
27#include "../../events/SDL_keyboard_c.h"
28#include "SDL_dbus.h"
29
30#ifdef SDL_VIDEO_DRIVER_X11
31#include "../../video/x11/SDL_x11video.h"
32#endif
33
34#define FCITX_DBUS_SERVICE "org.freedesktop.portal.Fcitx"
35
36#define FCITX_IM_DBUS_PATH "/org/freedesktop/portal/inputmethod"
37
38#define FCITX_IM_DBUS_INTERFACE "org.fcitx.Fcitx.InputMethod1"
39#define FCITX_IC_DBUS_INTERFACE "org.fcitx.Fcitx.InputContext1"
40
41#define DBUS_TIMEOUT 500
42
43typedef struct FcitxClient
44{
45 SDL_DBusContext *dbus;
46
47 char *ic_path;
48
49 int id;
50
51 SDL_Rect cursor_rect;
52} FcitxClient;
53
54static FcitxClient fcitx_client;
55
56static char *GetAppName(void)
57{
58#if defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_FREEBSD)
59 char *spot;
60 char procfile[1024];
61 char linkfile[1024];
62 int linksize;
63
64#ifdef SDL_PLATFORM_LINUX
65 (void)SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/exe", getpid());
66#elif defined(SDL_PLATFORM_FREEBSD)
67 (void)SDL_snprintf(procfile, sizeof(procfile), "/proc/%d/file", getpid());
68#endif
69 linksize = readlink(procfile, linkfile, sizeof(linkfile) - 1);
70 if (linksize > 0) {
71 linkfile[linksize] = '\0';
72 spot = SDL_strrchr(linkfile, '/');
73 if (spot) {
74 return SDL_strdup(spot + 1);
75 } else {
76 return SDL_strdup(linkfile);
77 }
78 }
79#endif // SDL_PLATFORM_LINUX || SDL_PLATFORM_FREEBSD
80
81 return SDL_strdup("SDL_App");
82}
83
84static size_t Fcitx_GetPreeditString(SDL_DBusContext *dbus,
85 DBusMessage *msg,
86 char **ret,
87 Sint32 *start_pos,
88 Sint32 *end_pos)
89{
90 char *text = NULL, *subtext;
91 size_t text_bytes = 0;
92 DBusMessageIter iter, array, sub;
93 Sint32 p_start_pos = -1;
94 Sint32 p_end_pos = -1;
95
96 dbus->message_iter_init(msg, &iter);
97 // Message type is a(si)i, we only need string part
98 if (dbus->message_iter_get_arg_type(&iter) == DBUS_TYPE_ARRAY) {
99 size_t pos = 0;
100 // First pass: calculate string length
101 dbus->message_iter_recurse(&iter, &array);
102 while (dbus->message_iter_get_arg_type(&array) == DBUS_TYPE_STRUCT) {
103 dbus->message_iter_recurse(&array, &sub);
104 subtext = NULL;
105 if (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING) {
106 dbus->message_iter_get_basic(&sub, &subtext);
107 if (subtext && *subtext) {
108 text_bytes += SDL_strlen(subtext);
109 }
110 }
111 dbus->message_iter_next(&sub);
112 if (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_INT32 && p_end_pos == -1) {
113 // Type is a bit field defined as follows:
114 // bit 3: Underline, bit 4: HighLight, bit 5: DontCommit,
115 // bit 6: Bold, bit 7: Strike, bit 8: Italic
116 Sint32 type;
117 dbus->message_iter_get_basic(&sub, &type);
118 // We only consider highlight
119 if (type & (1 << 4)) {
120 if (p_start_pos == -1) {
121 p_start_pos = pos;
122 }
123 } else if (p_start_pos != -1 && p_end_pos == -1) {
124 p_end_pos = pos;
125 }
126 }
127 dbus->message_iter_next(&array);
128 if (subtext && *subtext) {
129 pos += SDL_utf8strlen(subtext);
130 }
131 }
132 if (p_start_pos != -1 && p_end_pos == -1) {
133 p_end_pos = pos;
134 }
135 if (text_bytes) {
136 text = SDL_malloc(text_bytes + 1);
137 }
138
139 if (text) {
140 char *pivot = text;
141 // Second pass: join all the sub string
142 dbus->message_iter_recurse(&iter, &array);
143 while (dbus->message_iter_get_arg_type(&array) == DBUS_TYPE_STRUCT) {
144 dbus->message_iter_recurse(&array, &sub);
145 if (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_STRING) {
146 dbus->message_iter_get_basic(&sub, &subtext);
147 if (subtext && *subtext) {
148 size_t length = SDL_strlen(subtext);
149 SDL_strlcpy(pivot, subtext, length + 1);
150 pivot += length;
151 }
152 }
153 dbus->message_iter_next(&array);
154 }
155 } else {
156 text_bytes = 0;
157 }
158 }
159
160 *ret = text;
161 *start_pos = p_start_pos;
162 *end_pos = p_end_pos;
163 return text_bytes;
164}
165
166static Sint32 Fcitx_GetPreeditCursorByte(SDL_DBusContext *dbus, DBusMessage *msg)
167{
168 Sint32 byte = -1;
169 DBusMessageIter iter;
170
171 dbus->message_iter_init(msg, &iter);
172
173 dbus->message_iter_next(&iter);
174
175 if (dbus->message_iter_get_arg_type(&iter) != DBUS_TYPE_INT32) {
176 return -1;
177 }
178
179 dbus->message_iter_get_basic(&iter, &byte);
180
181 return byte;
182}
183
184static DBusHandlerResult DBus_MessageFilter(DBusConnection *conn, DBusMessage *msg, void *data)
185{
186 SDL_DBusContext *dbus = (SDL_DBusContext *)data;
187
188 if (dbus->message_is_signal(msg, FCITX_IC_DBUS_INTERFACE, "CommitString")) {
189 DBusMessageIter iter;
190 const char *text = NULL;
191
192 dbus->message_iter_init(msg, &iter);
193 dbus->message_iter_get_basic(&iter, &text);
194
195 SDL_SendKeyboardText(text);
196
197 return DBUS_HANDLER_RESULT_HANDLED;
198 }
199
200 if (dbus->message_is_signal(msg, FCITX_IC_DBUS_INTERFACE, "UpdateFormattedPreedit")) {
201 char *text = NULL;
202 Sint32 start_pos, end_pos;
203 size_t text_bytes = Fcitx_GetPreeditString(dbus, msg, &text, &start_pos, &end_pos);
204 if (text_bytes) {
205 if (start_pos == -1) {
206 Sint32 byte_pos = Fcitx_GetPreeditCursorByte(dbus, msg);
207 start_pos = byte_pos >= 0 ? SDL_utf8strnlen(text, byte_pos) : -1;
208 }
209 SDL_SendEditingText(text, start_pos, end_pos >= 0 ? end_pos - start_pos : -1);
210 SDL_free(text);
211 } else {
212 SDL_SendEditingText("", 0, 0);
213 }
214
215 SDL_Fcitx_UpdateTextInputArea(SDL_GetKeyboardFocus());
216 return DBUS_HANDLER_RESULT_HANDLED;
217 }
218
219 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
220}
221
222static void FcitxClientICCallMethod(FcitxClient *client, const char *method)
223{
224 if (!client->ic_path) {
225 return;
226 }
227 SDL_DBus_CallVoidMethod(FCITX_DBUS_SERVICE, client->ic_path, FCITX_IC_DBUS_INTERFACE, method, DBUS_TYPE_INVALID);
228}
229
230static void SDLCALL Fcitx_SetCapabilities(void *data,
231 const char *name,
232 const char *old_val,
233 const char *hint)
234{
235 FcitxClient *client = (FcitxClient *)data;
236 Uint64 caps = 0;
237 if (!client->ic_path) {
238 return;
239 }
240
241 if (hint && SDL_strstr(hint, "composition")) {
242 caps |= (1 << 1); // Preedit Flag
243 caps |= (1 << 4); // Formatted Preedit Flag
244 }
245 if (hint && SDL_strstr(hint, "candidates")) {
246 // FIXME, turn off native candidate rendering
247 }
248
249 SDL_DBus_CallVoidMethod(FCITX_DBUS_SERVICE, client->ic_path, FCITX_IC_DBUS_INTERFACE, "SetCapability", DBUS_TYPE_UINT64, &caps, DBUS_TYPE_INVALID);
250}
251
252static bool FcitxCreateInputContext(SDL_DBusContext *dbus, const char *appname, char **ic_path)
253{
254 const char *program = "program";
255 bool result = false;
256
257 if (dbus && dbus->session_conn) {
258 DBusMessage *msg = dbus->message_new_method_call(FCITX_DBUS_SERVICE, FCITX_IM_DBUS_PATH, FCITX_IM_DBUS_INTERFACE, "CreateInputContext");
259 if (msg) {
260 DBusMessage *reply = NULL;
261 DBusMessageIter args, array, sub;
262 dbus->message_iter_init_append(msg, &args);
263 dbus->message_iter_open_container(&args, DBUS_TYPE_ARRAY, "(ss)", &array);
264 dbus->message_iter_open_container(&array, DBUS_TYPE_STRUCT, 0, &sub);
265 dbus->message_iter_append_basic(&sub, DBUS_TYPE_STRING, &program);
266 dbus->message_iter_append_basic(&sub, DBUS_TYPE_STRING, &appname);
267 dbus->message_iter_close_container(&array, &sub);
268 dbus->message_iter_close_container(&args, &array);
269 reply = dbus->connection_send_with_reply_and_block(dbus->session_conn, msg, 300, NULL);
270 if (reply) {
271 if (dbus->message_get_args(reply, NULL, DBUS_TYPE_OBJECT_PATH, ic_path, DBUS_TYPE_INVALID)) {
272 result = true;
273 }
274 dbus->message_unref(reply);
275 }
276 dbus->message_unref(msg);
277 }
278 }
279 return result;
280}
281
282static bool FcitxClientCreateIC(FcitxClient *client)
283{
284 char *appname = GetAppName();
285 char *ic_path = NULL;
286 SDL_DBusContext *dbus = client->dbus;
287
288 // SDL_DBus_CallMethod cannot handle a(ss) type, call dbus function directly
289 if (!FcitxCreateInputContext(dbus, appname, &ic_path)) {
290 ic_path = NULL; // just in case.
291 }
292
293 SDL_free(appname);
294
295 if (ic_path) {
296 SDL_free(client->ic_path);
297 client->ic_path = SDL_strdup(ic_path);
298
299 dbus->bus_add_match(dbus->session_conn,
300 "type='signal', interface='org.fcitx.Fcitx.InputContext1'",
301 NULL);
302 dbus->connection_add_filter(dbus->session_conn,
303 &DBus_MessageFilter, dbus,
304 NULL);
305 dbus->connection_flush(dbus->session_conn);
306
307 SDL_AddHintCallback(SDL_HINT_IME_IMPLEMENTED_UI, Fcitx_SetCapabilities, client);
308 return true;
309 }
310
311 return false;
312}
313
314static Uint32 Fcitx_ModState(void)
315{
316 Uint32 fcitx_mods = 0;
317 SDL_Keymod sdl_mods = SDL_GetModState();
318
319 if (sdl_mods & SDL_KMOD_SHIFT) {
320 fcitx_mods |= (1 << 0);
321 }
322 if (sdl_mods & SDL_KMOD_CAPS) {
323 fcitx_mods |= (1 << 1);
324 }
325 if (sdl_mods & SDL_KMOD_CTRL) {
326 fcitx_mods |= (1 << 2);
327 }
328 if (sdl_mods & SDL_KMOD_ALT) {
329 fcitx_mods |= (1 << 3);
330 }
331 if (sdl_mods & SDL_KMOD_NUM) {
332 fcitx_mods |= (1 << 4);
333 }
334 if (sdl_mods & SDL_KMOD_MODE) {
335 fcitx_mods |= (1 << 7);
336 }
337 if (sdl_mods & SDL_KMOD_LGUI) {
338 fcitx_mods |= (1 << 6);
339 }
340 if (sdl_mods & SDL_KMOD_RGUI) {
341 fcitx_mods |= (1 << 28);
342 }
343
344 return fcitx_mods;
345}
346
347bool SDL_Fcitx_Init(void)
348{
349 fcitx_client.dbus = SDL_DBus_GetContext();
350
351 fcitx_client.cursor_rect.x = -1;
352 fcitx_client.cursor_rect.y = -1;
353 fcitx_client.cursor_rect.w = 0;
354 fcitx_client.cursor_rect.h = 0;
355
356 return FcitxClientCreateIC(&fcitx_client);
357}
358
359void SDL_Fcitx_Quit(void)
360{
361 FcitxClientICCallMethod(&fcitx_client, "DestroyIC");
362 if (fcitx_client.ic_path) {
363 SDL_free(fcitx_client.ic_path);
364 fcitx_client.ic_path = NULL;
365 }
366}
367
368void SDL_Fcitx_SetFocus(bool focused)
369{
370 if (focused) {
371 FcitxClientICCallMethod(&fcitx_client, "FocusIn");
372 } else {
373 FcitxClientICCallMethod(&fcitx_client, "FocusOut");
374 }
375}
376
377void SDL_Fcitx_Reset(void)
378{
379 FcitxClientICCallMethod(&fcitx_client, "Reset");
380}
381
382bool SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, bool down)
383{
384 Uint32 mod_state = Fcitx_ModState();
385 Uint32 handled = false;
386 Uint32 is_release = !down;
387 Uint32 event_time = 0;
388
389 if (!fcitx_client.ic_path) {
390 return false;
391 }
392
393 if (SDL_DBus_CallMethod(FCITX_DBUS_SERVICE, fcitx_client.ic_path, FCITX_IC_DBUS_INTERFACE, "ProcessKeyEvent",
394 DBUS_TYPE_UINT32, &keysym, DBUS_TYPE_UINT32, &keycode, DBUS_TYPE_UINT32, &mod_state, DBUS_TYPE_BOOLEAN, &is_release, DBUS_TYPE_UINT32, &event_time, DBUS_TYPE_INVALID,
395 DBUS_TYPE_BOOLEAN, &handled, DBUS_TYPE_INVALID)) {
396 if (handled) {
397 SDL_Fcitx_UpdateTextInputArea(SDL_GetKeyboardFocus());
398 return true;
399 }
400 }
401
402 return false;
403}
404
405void SDL_Fcitx_UpdateTextInputArea(SDL_Window *window)
406{
407 int x = 0, y = 0;
408 SDL_Rect *cursor = &fcitx_client.cursor_rect;
409
410 if (!window) {
411 return;
412 }
413
414 // We'll use a square at the text input cursor location for the cursor_rect
415 cursor->x = window->text_input_rect.x + window->text_input_cursor;
416 cursor->y = window->text_input_rect.y;
417 cursor->w = window->text_input_rect.h;
418 cursor->h = window->text_input_rect.h;
419
420 SDL_GetWindowPosition(window, &x, &y);
421
422#ifdef SDL_VIDEO_DRIVER_X11
423 {
424 SDL_PropertiesID props = SDL_GetWindowProperties(window);
425 Display *x_disp = (Display *)SDL_GetPointerProperty(props, SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
426 int x_screen = SDL_GetNumberProperty(props, SDL_PROP_WINDOW_X11_SCREEN_NUMBER, 0);
427 Window x_win = SDL_GetNumberProperty(props, SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0);
428 Window unused;
429 if (x_disp && x_win) {
430 X11_XTranslateCoordinates(x_disp, x_win, RootWindow(x_disp, x_screen), 0, 0, &x, &y, &unused);
431 }
432 }
433#endif
434
435 if (cursor->x == -1 && cursor->y == -1 && cursor->w == 0 && cursor->h == 0) {
436 // move to bottom left
437 int w = 0, h = 0;
438 SDL_GetWindowSize(window, &w, &h);
439 cursor->x = 0;
440 cursor->y = h;
441 }
442
443 x += cursor->x;
444 y += cursor->y;
445
446 SDL_DBus_CallVoidMethod(FCITX_DBUS_SERVICE, fcitx_client.ic_path, FCITX_IC_DBUS_INTERFACE, "SetCursorRect",
447 DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y, DBUS_TYPE_INT32, &cursor->w, DBUS_TYPE_INT32, &cursor->h, DBUS_TYPE_INVALID);
448}
449
450void SDL_Fcitx_PumpEvents(void)
451{
452 SDL_DBusContext *dbus = fcitx_client.dbus;
453 DBusConnection *conn = dbus->session_conn;
454
455 dbus->connection_read_write(conn, 0);
456
457 while (dbus->connection_dispatch(conn) == DBUS_DISPATCH_DATA_REMAINS) {
458 // Do nothing, actual work happens in DBus_MessageFilter
459 }
460}
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_fcitx.h b/contrib/SDL-3.2.8/src/core/linux/SDL_fcitx.h
new file mode 100644
index 0000000..82c544e
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_fcitx.h
@@ -0,0 +1,35 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_fcitx_h_
23#define SDL_fcitx_h_
24
25#include "SDL_internal.h"
26
27extern bool SDL_Fcitx_Init(void);
28extern void SDL_Fcitx_Quit(void);
29extern void SDL_Fcitx_SetFocus(bool focused);
30extern void SDL_Fcitx_Reset(void);
31extern bool SDL_Fcitx_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, bool down);
32extern void SDL_Fcitx_UpdateTextInputArea(SDL_Window *window);
33extern void SDL_Fcitx_PumpEvents(void);
34
35#endif // SDL_fcitx_h_
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_ibus.c b/contrib/SDL-3.2.8/src/core/linux/SDL_ibus.c
new file mode 100644
index 0000000..ea58ed5
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_ibus.c
@@ -0,0 +1,743 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23#ifdef HAVE_IBUS_IBUS_H
24#include "SDL_ibus.h"
25#include "SDL_dbus.h"
26
27#ifdef SDL_USE_LIBDBUS
28
29#include "../../video/SDL_sysvideo.h"
30#include "../../events/SDL_keyboard_c.h"
31
32#ifdef SDL_VIDEO_DRIVER_X11
33#include "../../video/x11/SDL_x11video.h"
34#endif
35
36#include <sys/inotify.h>
37#include <unistd.h>
38#include <fcntl.h>
39
40static const char IBUS_PATH[] = "/org/freedesktop/IBus";
41
42static const char IBUS_SERVICE[] = "org.freedesktop.IBus";
43static const char IBUS_INTERFACE[] = "org.freedesktop.IBus";
44static const char IBUS_INPUT_INTERFACE[] = "org.freedesktop.IBus.InputContext";
45
46static const char IBUS_PORTAL_SERVICE[] = "org.freedesktop.portal.IBus";
47static const char IBUS_PORTAL_INTERFACE[] = "org.freedesktop.IBus.Portal";
48static const char IBUS_PORTAL_INPUT_INTERFACE[] = "org.freedesktop.IBus.InputContext";
49
50static const char *ibus_service = NULL;
51static const char *ibus_interface = NULL;
52static const char *ibus_input_interface = NULL;
53static char *input_ctx_path = NULL;
54static SDL_Rect ibus_cursor_rect = { 0, 0, 0, 0 };
55static DBusConnection *ibus_conn = NULL;
56static bool ibus_is_portal_interface = false;
57static char *ibus_addr_file = NULL;
58static int inotify_fd = -1, inotify_wd = -1;
59
60static Uint32 IBus_ModState(void)
61{
62 Uint32 ibus_mods = 0;
63 SDL_Keymod sdl_mods = SDL_GetModState();
64
65 // Not sure about MOD3, MOD4 and HYPER mappings
66 if (sdl_mods & SDL_KMOD_LSHIFT) {
67 ibus_mods |= IBUS_SHIFT_MASK;
68 }
69 if (sdl_mods & SDL_KMOD_CAPS) {
70 ibus_mods |= IBUS_LOCK_MASK;
71 }
72 if (sdl_mods & SDL_KMOD_LCTRL) {
73 ibus_mods |= IBUS_CONTROL_MASK;
74 }
75 if (sdl_mods & SDL_KMOD_LALT) {
76 ibus_mods |= IBUS_MOD1_MASK;
77 }
78 if (sdl_mods & SDL_KMOD_NUM) {
79 ibus_mods |= IBUS_MOD2_MASK;
80 }
81 if (sdl_mods & SDL_KMOD_MODE) {
82 ibus_mods |= IBUS_MOD5_MASK;
83 }
84 if (sdl_mods & SDL_KMOD_LGUI) {
85 ibus_mods |= IBUS_SUPER_MASK;
86 }
87 if (sdl_mods & SDL_KMOD_RGUI) {
88 ibus_mods |= IBUS_META_MASK;
89 }
90
91 return ibus_mods;
92}
93
94static bool IBus_EnterVariant(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus,
95 DBusMessageIter *inside, const char *struct_id, size_t id_size)
96{
97 DBusMessageIter sub;
98 if (dbus->message_iter_get_arg_type(iter) != DBUS_TYPE_VARIANT) {
99 return false;
100 }
101
102 dbus->message_iter_recurse(iter, &sub);
103
104 if (dbus->message_iter_get_arg_type(&sub) != DBUS_TYPE_STRUCT) {
105 return false;
106 }
107
108 dbus->message_iter_recurse(&sub, inside);
109
110 if (dbus->message_iter_get_arg_type(inside) != DBUS_TYPE_STRING) {
111 return false;
112 }
113
114 dbus->message_iter_get_basic(inside, &struct_id);
115 if (!struct_id || SDL_strncmp(struct_id, struct_id, id_size) != 0) {
116 return false;
117 }
118 return true;
119}
120
121static bool IBus_GetDecorationPosition(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus,
122 Uint32 *start_pos, Uint32 *end_pos)
123{
124 DBusMessageIter sub1, sub2, array;
125
126 if (!IBus_EnterVariant(conn, iter, dbus, &sub1, "IBusText", sizeof("IBusText"))) {
127 return false;
128 }
129
130 dbus->message_iter_next(&sub1);
131 dbus->message_iter_next(&sub1);
132 dbus->message_iter_next(&sub1);
133
134 if (!IBus_EnterVariant(conn, &sub1, dbus, &sub2, "IBusAttrList", sizeof("IBusAttrList"))) {
135 return false;
136 }
137
138 dbus->message_iter_next(&sub2);
139 dbus->message_iter_next(&sub2);
140
141 if (dbus->message_iter_get_arg_type(&sub2) != DBUS_TYPE_ARRAY) {
142 return false;
143 }
144
145 dbus->message_iter_recurse(&sub2, &array);
146
147 while (dbus->message_iter_get_arg_type(&array) == DBUS_TYPE_VARIANT) {
148 DBusMessageIter sub;
149 if (IBus_EnterVariant(conn, &array, dbus, &sub, "IBusAttribute", sizeof("IBusAttribute"))) {
150 Uint32 type;
151
152 dbus->message_iter_next(&sub);
153 dbus->message_iter_next(&sub);
154
155 // From here on, the structure looks like this:
156 // Uint32 type: 1=underline, 2=foreground, 3=background
157 // Uint32 value: for underline it's 0=NONE, 1=SINGLE, 2=DOUBLE,
158 // 3=LOW, 4=ERROR
159 // for foreground and background it's a color
160 // Uint32 start_index: starting position for the style (utf8-char)
161 // Uint32 end_index: end position for the style (utf8-char)
162
163 dbus->message_iter_get_basic(&sub, &type);
164 // We only use the background type to determine the selection
165 if (type == 3) {
166 Uint32 start = -1;
167 dbus->message_iter_next(&sub);
168 dbus->message_iter_next(&sub);
169 if (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_UINT32) {
170 dbus->message_iter_get_basic(&sub, &start);
171 dbus->message_iter_next(&sub);
172 if (dbus->message_iter_get_arg_type(&sub) == DBUS_TYPE_UINT32) {
173 dbus->message_iter_get_basic(&sub, end_pos);
174 *start_pos = start;
175 return true;
176 }
177 }
178 }
179 }
180 dbus->message_iter_next(&array);
181 }
182 return false;
183}
184
185static const char *IBus_GetVariantText(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus)
186{
187 // The text we need is nested weirdly, use dbus-monitor to see the structure better
188 const char *text = NULL;
189 DBusMessageIter sub;
190
191 if (!IBus_EnterVariant(conn, iter, dbus, &sub, "IBusText", sizeof("IBusText"))) {
192 return NULL;
193 }
194
195 dbus->message_iter_next(&sub);
196 dbus->message_iter_next(&sub);
197
198 if (dbus->message_iter_get_arg_type(&sub) != DBUS_TYPE_STRING) {
199 return NULL;
200 }
201 dbus->message_iter_get_basic(&sub, &text);
202
203 return text;
204}
205
206static bool IBus_GetVariantCursorPos(DBusConnection *conn, DBusMessageIter *iter, SDL_DBusContext *dbus,
207 Uint32 *pos)
208{
209 dbus->message_iter_next(iter);
210
211 if (dbus->message_iter_get_arg_type(iter) != DBUS_TYPE_UINT32) {
212 return false;
213 }
214
215 dbus->message_iter_get_basic(iter, pos);
216
217 return true;
218}
219
220static DBusHandlerResult IBus_MessageHandler(DBusConnection *conn, DBusMessage *msg, void *user_data)
221{
222 SDL_DBusContext *dbus = (SDL_DBusContext *)user_data;
223
224 if (dbus->message_is_signal(msg, ibus_input_interface, "CommitText")) {
225 DBusMessageIter iter;
226 const char *text;
227
228 dbus->message_iter_init(msg, &iter);
229 text = IBus_GetVariantText(conn, &iter, dbus);
230
231 SDL_SendKeyboardText(text);
232
233 return DBUS_HANDLER_RESULT_HANDLED;
234 }
235
236 if (dbus->message_is_signal(msg, ibus_input_interface, "UpdatePreeditText")) {
237 DBusMessageIter iter;
238 const char *text;
239
240 dbus->message_iter_init(msg, &iter);
241 text = IBus_GetVariantText(conn, &iter, dbus);
242
243 if (text) {
244 Uint32 pos, start_pos, end_pos;
245 bool has_pos = false;
246 bool has_dec_pos = false;
247
248 dbus->message_iter_init(msg, &iter);
249 has_dec_pos = IBus_GetDecorationPosition(conn, &iter, dbus, &start_pos, &end_pos);
250 if (!has_dec_pos) {
251 dbus->message_iter_init(msg, &iter);
252 has_pos = IBus_GetVariantCursorPos(conn, &iter, dbus, &pos);
253 }
254
255 if (has_dec_pos) {
256 SDL_SendEditingText(text, start_pos, end_pos - start_pos);
257 } else if (has_pos) {
258 SDL_SendEditingText(text, pos, -1);
259 } else {
260 SDL_SendEditingText(text, -1, -1);
261 }
262 }
263
264 SDL_IBus_UpdateTextInputArea(SDL_GetKeyboardFocus());
265
266 return DBUS_HANDLER_RESULT_HANDLED;
267 }
268
269 if (dbus->message_is_signal(msg, ibus_input_interface, "HidePreeditText")) {
270 SDL_SendEditingText("", 0, 0);
271 return DBUS_HANDLER_RESULT_HANDLED;
272 }
273
274 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
275}
276
277static char *IBus_ReadAddressFromFile(const char *file_path)
278{
279 char addr_buf[1024];
280 bool success = false;
281 FILE *addr_file;
282
283 addr_file = fopen(file_path, "r");
284 if (!addr_file) {
285 return NULL;
286 }
287
288 while (fgets(addr_buf, sizeof(addr_buf), addr_file)) {
289 if (SDL_strncmp(addr_buf, "IBUS_ADDRESS=", sizeof("IBUS_ADDRESS=") - 1) == 0) {
290 size_t sz = SDL_strlen(addr_buf);
291 if (addr_buf[sz - 1] == '\n') {
292 addr_buf[sz - 1] = 0;
293 }
294 if (addr_buf[sz - 2] == '\r') {
295 addr_buf[sz - 2] = 0;
296 }
297 success = true;
298 break;
299 }
300 }
301
302 (void)fclose(addr_file);
303
304 if (success) {
305 return SDL_strdup(addr_buf + (sizeof("IBUS_ADDRESS=") - 1));
306 } else {
307 return NULL;
308 }
309}
310
311static char *IBus_GetDBusAddressFilename(void)
312{
313 SDL_DBusContext *dbus;
314 const char *disp_env;
315 char config_dir[PATH_MAX];
316 char *display = NULL;
317 const char *addr;
318 const char *conf_env;
319 char *key;
320 char file_path[PATH_MAX];
321 const char *host;
322 char *disp_num, *screen_num;
323
324 if (ibus_addr_file) {
325 return SDL_strdup(ibus_addr_file);
326 }
327
328 dbus = SDL_DBus_GetContext();
329 if (!dbus) {
330 return NULL;
331 }
332
333 // Use this environment variable if it exists.
334 addr = SDL_getenv("IBUS_ADDRESS");
335 if (addr && *addr) {
336 return SDL_strdup(addr);
337 }
338
339 /* Otherwise, we have to get the hostname, display, machine id, config dir
340 and look up the address from a filepath using all those bits, eek. */
341 disp_env = SDL_getenv("DISPLAY");
342
343 if (!disp_env || !*disp_env) {
344 display = SDL_strdup(":0.0");
345 } else {
346 display = SDL_strdup(disp_env);
347 }
348
349 host = display;
350 disp_num = SDL_strrchr(display, ':');
351 screen_num = SDL_strrchr(display, '.');
352
353 if (!disp_num) {
354 SDL_free(display);
355 return NULL;
356 }
357
358 *disp_num = 0;
359 disp_num++;
360
361 if (screen_num) {
362 *screen_num = 0;
363 }
364
365 if (!*host) {
366 const char *session = SDL_getenv("XDG_SESSION_TYPE");
367 if (session && SDL_strcmp(session, "wayland") == 0) {
368 host = "unix-wayland";
369 } else {
370 host = "unix";
371 }
372 }
373
374 SDL_memset(config_dir, 0, sizeof(config_dir));
375
376 conf_env = SDL_getenv("XDG_CONFIG_HOME");
377 if (conf_env && *conf_env) {
378 SDL_strlcpy(config_dir, conf_env, sizeof(config_dir));
379 } else {
380 const char *home_env = SDL_getenv("HOME");
381 if (!home_env || !*home_env) {
382 SDL_free(display);
383 return NULL;
384 }
385 (void)SDL_snprintf(config_dir, sizeof(config_dir), "%s/.config", home_env);
386 }
387
388 key = SDL_DBus_GetLocalMachineId();
389
390 if (!key) {
391 SDL_free(display);
392 return NULL;
393 }
394
395 SDL_memset(file_path, 0, sizeof(file_path));
396 (void)SDL_snprintf(file_path, sizeof(file_path), "%s/ibus/bus/%s-%s-%s",
397 config_dir, key, host, disp_num);
398 dbus->free(key);
399 SDL_free(display);
400
401 return SDL_strdup(file_path);
402}
403
404static bool IBus_CheckConnection(SDL_DBusContext *dbus);
405
406static void SDLCALL IBus_SetCapabilities(void *data, const char *name, const char *old_val,
407 const char *hint)
408{
409 SDL_DBusContext *dbus = SDL_DBus_GetContext();
410
411 if (IBus_CheckConnection(dbus)) {
412 Uint32 caps = IBUS_CAP_FOCUS;
413
414 if (hint && SDL_strstr(hint, "composition")) {
415 caps |= IBUS_CAP_PREEDIT_TEXT;
416 }
417 if (hint && SDL_strstr(hint, "candidates")) {
418 // FIXME, turn off native candidate rendering
419 }
420
421 SDL_DBus_CallVoidMethodOnConnection(ibus_conn, ibus_service, input_ctx_path, ibus_input_interface, "SetCapabilities",
422 DBUS_TYPE_UINT32, &caps, DBUS_TYPE_INVALID);
423 }
424}
425
426static bool IBus_SetupConnection(SDL_DBusContext *dbus, const char *addr)
427{
428 const char *client_name = "SDL3_Application";
429 const char *path = NULL;
430 bool result = false;
431 DBusObjectPathVTable ibus_vtable;
432
433 SDL_zero(ibus_vtable);
434 ibus_vtable.message_function = &IBus_MessageHandler;
435
436 /* try the portal interface first. Modern systems have this in general,
437 and sandbox things like FlakPak and Snaps, etc, require it. */
438
439 ibus_is_portal_interface = true;
440 ibus_service = IBUS_PORTAL_SERVICE;
441 ibus_interface = IBUS_PORTAL_INTERFACE;
442 ibus_input_interface = IBUS_PORTAL_INPUT_INTERFACE;
443 ibus_conn = dbus->session_conn;
444
445 result = SDL_DBus_CallMethodOnConnection(ibus_conn, ibus_service, IBUS_PATH, ibus_interface, "CreateInputContext",
446 DBUS_TYPE_STRING, &client_name, DBUS_TYPE_INVALID,
447 DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID);
448 if (!result) {
449 ibus_is_portal_interface = false;
450 ibus_service = IBUS_SERVICE;
451 ibus_interface = IBUS_INTERFACE;
452 ibus_input_interface = IBUS_INPUT_INTERFACE;
453 ibus_conn = dbus->connection_open_private(addr, NULL);
454
455 if (!ibus_conn) {
456 return false; // oh well.
457 }
458
459 dbus->connection_flush(ibus_conn);
460
461 if (!dbus->bus_register(ibus_conn, NULL)) {
462 ibus_conn = NULL;
463 return false;
464 }
465
466 dbus->connection_flush(ibus_conn);
467
468 result = SDL_DBus_CallMethodOnConnection(ibus_conn, ibus_service, IBUS_PATH, ibus_interface, "CreateInputContext",
469 DBUS_TYPE_STRING, &client_name, DBUS_TYPE_INVALID,
470 DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID);
471 } else {
472 // re-using dbus->session_conn
473 dbus->connection_ref(ibus_conn);
474 }
475
476 if (result) {
477 char matchstr[128];
478 (void)SDL_snprintf(matchstr, sizeof(matchstr), "type='signal',interface='%s'", ibus_input_interface);
479 SDL_free(input_ctx_path);
480 input_ctx_path = SDL_strdup(path);
481 SDL_AddHintCallback(SDL_HINT_IME_IMPLEMENTED_UI, IBus_SetCapabilities, NULL);
482 dbus->bus_add_match(ibus_conn, matchstr, NULL);
483 dbus->connection_try_register_object_path(ibus_conn, input_ctx_path, &ibus_vtable, dbus, NULL);
484 dbus->connection_flush(ibus_conn);
485 }
486
487 SDL_Window *window = SDL_GetKeyboardFocus();
488 if (SDL_TextInputActive(window)) {
489 SDL_IBus_SetFocus(true);
490 SDL_IBus_UpdateTextInputArea(window);
491 } else {
492 SDL_IBus_SetFocus(false);
493 }
494 return result;
495}
496
497static bool IBus_CheckConnection(SDL_DBusContext *dbus)
498{
499 if (!dbus) {
500 return false;
501 }
502
503 if (ibus_conn && dbus->connection_get_is_connected(ibus_conn)) {
504 return true;
505 }
506
507 if (inotify_fd > 0 && inotify_wd > 0) {
508 char buf[1024];
509 ssize_t readsize = read(inotify_fd, buf, sizeof(buf));
510 if (readsize > 0) {
511
512 char *p;
513 bool file_updated = false;
514
515 for (p = buf; p < buf + readsize; /**/) {
516 struct inotify_event *event = (struct inotify_event *)p;
517 if (event->len > 0) {
518 char *addr_file_no_path = SDL_strrchr(ibus_addr_file, '/');
519 if (!addr_file_no_path) {
520 return false;
521 }
522
523 if (SDL_strcmp(addr_file_no_path + 1, event->name) == 0) {
524 file_updated = true;
525 break;
526 }
527 }
528
529 p += sizeof(struct inotify_event) + event->len;
530 }
531
532 if (file_updated) {
533 char *addr = IBus_ReadAddressFromFile(ibus_addr_file);
534 if (addr) {
535 bool result = IBus_SetupConnection(dbus, addr);
536 SDL_free(addr);
537 return result;
538 }
539 }
540 }
541 }
542
543 return false;
544}
545
546bool SDL_IBus_Init(void)
547{
548 bool result = false;
549 SDL_DBusContext *dbus = SDL_DBus_GetContext();
550
551 if (dbus) {
552 char *addr_file = IBus_GetDBusAddressFilename();
553 char *addr;
554 char *addr_file_dir;
555
556 if (!addr_file) {
557 return false;
558 }
559
560 addr = IBus_ReadAddressFromFile(addr_file);
561 if (!addr) {
562 SDL_free(addr_file);
563 return false;
564 }
565
566 if (ibus_addr_file) {
567 SDL_free(ibus_addr_file);
568 }
569 ibus_addr_file = SDL_strdup(addr_file);
570
571 if (inotify_fd < 0) {
572 inotify_fd = inotify_init();
573 fcntl(inotify_fd, F_SETFL, O_NONBLOCK);
574 }
575
576 addr_file_dir = SDL_strrchr(addr_file, '/');
577 if (addr_file_dir) {
578 *addr_file_dir = 0;
579 }
580
581 inotify_wd = inotify_add_watch(inotify_fd, addr_file, IN_CREATE | IN_MODIFY);
582 SDL_free(addr_file);
583
584 result = IBus_SetupConnection(dbus, addr);
585 SDL_free(addr);
586
587 // don't use the addr_file if using the portal interface.
588 if (result && ibus_is_portal_interface) {
589 if (inotify_fd > 0) {
590 if (inotify_wd > 0) {
591 inotify_rm_watch(inotify_fd, inotify_wd);
592 inotify_wd = -1;
593 }
594 close(inotify_fd);
595 inotify_fd = -1;
596 }
597 }
598 }
599
600 return result;
601}
602
603void SDL_IBus_Quit(void)
604{
605 SDL_DBusContext *dbus;
606
607 if (input_ctx_path) {
608 SDL_free(input_ctx_path);
609 input_ctx_path = NULL;
610 }
611
612 if (ibus_addr_file) {
613 SDL_free(ibus_addr_file);
614 ibus_addr_file = NULL;
615 }
616
617 dbus = SDL_DBus_GetContext();
618
619 // if using portal, ibus_conn == session_conn; don't release it here.
620 if (dbus && ibus_conn && !ibus_is_portal_interface) {
621 dbus->connection_close(ibus_conn);
622 dbus->connection_unref(ibus_conn);
623 }
624
625 ibus_conn = NULL;
626 ibus_service = NULL;
627 ibus_interface = NULL;
628 ibus_input_interface = NULL;
629 ibus_is_portal_interface = false;
630
631 if (inotify_fd > 0 && inotify_wd > 0) {
632 inotify_rm_watch(inotify_fd, inotify_wd);
633 inotify_wd = -1;
634 }
635
636 // !!! FIXME: should we close(inotify_fd) here?
637
638 SDL_RemoveHintCallback(SDL_HINT_IME_IMPLEMENTED_UI, IBus_SetCapabilities, NULL);
639
640 SDL_memset(&ibus_cursor_rect, 0, sizeof(ibus_cursor_rect));
641}
642
643static void IBus_SimpleMessage(const char *method)
644{
645 SDL_DBusContext *dbus = SDL_DBus_GetContext();
646
647 if ((input_ctx_path) && (IBus_CheckConnection(dbus))) {
648 SDL_DBus_CallVoidMethodOnConnection(ibus_conn, ibus_service, input_ctx_path, ibus_input_interface, method, DBUS_TYPE_INVALID);
649 }
650}
651
652void SDL_IBus_SetFocus(bool focused)
653{
654 const char *method = focused ? "FocusIn" : "FocusOut";
655 IBus_SimpleMessage(method);
656}
657
658void SDL_IBus_Reset(void)
659{
660 IBus_SimpleMessage("Reset");
661}
662
663bool SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, bool down)
664{
665 Uint32 result = 0;
666 SDL_DBusContext *dbus = SDL_DBus_GetContext();
667
668 if (IBus_CheckConnection(dbus)) {
669 Uint32 mods = IBus_ModState();
670 Uint32 ibus_keycode = keycode - 8;
671 if (!down) {
672 mods |= (1 << 30); // IBUS_RELEASE_MASK
673 }
674 if (!SDL_DBus_CallMethodOnConnection(ibus_conn, ibus_service, input_ctx_path, ibus_input_interface, "ProcessKeyEvent",
675 DBUS_TYPE_UINT32, &keysym, DBUS_TYPE_UINT32, &ibus_keycode, DBUS_TYPE_UINT32, &mods, DBUS_TYPE_INVALID,
676 DBUS_TYPE_BOOLEAN, &result, DBUS_TYPE_INVALID)) {
677 result = 0;
678 }
679 }
680
681 SDL_IBus_UpdateTextInputArea(SDL_GetKeyboardFocus());
682
683 return (result != 0);
684}
685
686void SDL_IBus_UpdateTextInputArea(SDL_Window *window)
687{
688 int x = 0, y = 0;
689 SDL_DBusContext *dbus;
690
691 if (!window) {
692 return;
693 }
694
695 // We'll use a square at the text input cursor location for the ibus_cursor
696 ibus_cursor_rect.x = window->text_input_rect.x + window->text_input_cursor;
697 ibus_cursor_rect.y = window->text_input_rect.y;
698 ibus_cursor_rect.w = window->text_input_rect.h;
699 ibus_cursor_rect.h = window->text_input_rect.h;
700
701 SDL_GetWindowPosition(window, &x, &y);
702
703#ifdef SDL_VIDEO_DRIVER_X11
704 {
705 SDL_PropertiesID props = SDL_GetWindowProperties(window);
706 Display *x_disp = (Display *)SDL_GetPointerProperty(props, SDL_PROP_WINDOW_X11_DISPLAY_POINTER, NULL);
707 int x_screen = SDL_GetNumberProperty(props, SDL_PROP_WINDOW_X11_SCREEN_NUMBER, 0);
708 Window x_win = SDL_GetNumberProperty(props, SDL_PROP_WINDOW_X11_WINDOW_NUMBER, 0);
709 Window unused;
710
711 if (x_disp && x_win) {
712 X11_XTranslateCoordinates(x_disp, x_win, RootWindow(x_disp, x_screen), 0, 0, &x, &y, &unused);
713 }
714 }
715#endif
716
717 x += ibus_cursor_rect.x;
718 y += ibus_cursor_rect.y;
719
720 dbus = SDL_DBus_GetContext();
721
722 if (IBus_CheckConnection(dbus)) {
723 SDL_DBus_CallVoidMethodOnConnection(ibus_conn, ibus_service, input_ctx_path, ibus_input_interface, "SetCursorLocation",
724 DBUS_TYPE_INT32, &x, DBUS_TYPE_INT32, &y, DBUS_TYPE_INT32, &ibus_cursor_rect.w, DBUS_TYPE_INT32, &ibus_cursor_rect.h, DBUS_TYPE_INVALID);
725 }
726}
727
728void SDL_IBus_PumpEvents(void)
729{
730 SDL_DBusContext *dbus = SDL_DBus_GetContext();
731
732 if (IBus_CheckConnection(dbus)) {
733 dbus->connection_read_write(ibus_conn, 0);
734
735 while (dbus->connection_dispatch(ibus_conn) == DBUS_DISPATCH_DATA_REMAINS) {
736 // Do nothing, actual work happens in IBus_MessageHandler
737 }
738 }
739}
740
741#endif // SDL_USE_LIBDBUS
742
743#endif
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_ibus.h b/contrib/SDL-3.2.8/src/core/linux/SDL_ibus.h
new file mode 100644
index 0000000..ba08be6
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_ibus.h
@@ -0,0 +1,55 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#include "SDL_internal.h"
23
24#ifndef SDL_ibus_h_
25#define SDL_ibus_h_
26
27#ifdef HAVE_IBUS_IBUS_H
28#define SDL_USE_IBUS 1
29#include <ibus.h>
30
31extern bool SDL_IBus_Init(void);
32extern void SDL_IBus_Quit(void);
33
34// Lets the IBus server know about changes in window focus
35extern void SDL_IBus_SetFocus(bool focused);
36
37// Closes the candidate list and resets any text currently being edited
38extern void SDL_IBus_Reset(void);
39
40/* Sends a keypress event to IBus, returns true if IBus used this event to
41 update its candidate list or change input methods. PumpEvents should be
42 called some time after this, to receive the TextInput / TextEditing event back. */
43extern bool SDL_IBus_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, bool down);
44
45/* Update the position of IBus' candidate list. If rect is NULL then this will
46 just reposition it relative to the focused window's new position. */
47extern void SDL_IBus_UpdateTextInputArea(SDL_Window *window);
48
49/* Checks DBus for new IBus events, and calls SDL_SendKeyboardText /
50 SDL_SendEditingText for each event it finds */
51extern void SDL_IBus_PumpEvents(void);
52
53#endif // HAVE_IBUS_IBUS_H
54
55#endif // SDL_ibus_h_
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_ime.c b/contrib/SDL-3.2.8/src/core/linux/SDL_ime.c
new file mode 100644
index 0000000..c15defb
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_ime.c
@@ -0,0 +1,150 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23#include "SDL_ime.h"
24#include "SDL_ibus.h"
25#include "SDL_fcitx.h"
26
27typedef bool (*SDL_IME_Init_t)(void);
28typedef void (*SDL_IME_Quit_t)(void);
29typedef void (*SDL_IME_SetFocus_t)(bool);
30typedef void (*SDL_IME_Reset_t)(void);
31typedef bool (*SDL_IME_ProcessKeyEvent_t)(Uint32, Uint32, bool down);
32typedef void (*SDL_IME_UpdateTextInputArea_t)(SDL_Window *window);
33typedef void (*SDL_IME_PumpEvents_t)(void);
34
35static SDL_IME_Init_t SDL_IME_Init_Real = NULL;
36static SDL_IME_Quit_t SDL_IME_Quit_Real = NULL;
37static SDL_IME_SetFocus_t SDL_IME_SetFocus_Real = NULL;
38static SDL_IME_Reset_t SDL_IME_Reset_Real = NULL;
39static SDL_IME_ProcessKeyEvent_t SDL_IME_ProcessKeyEvent_Real = NULL;
40static SDL_IME_UpdateTextInputArea_t SDL_IME_UpdateTextInputArea_Real = NULL;
41static SDL_IME_PumpEvents_t SDL_IME_PumpEvents_Real = NULL;
42
43static void InitIME(void)
44{
45 static bool inited = false;
46#ifdef HAVE_FCITX
47 const char *im_module = SDL_getenv("SDL_IM_MODULE");
48 const char *xmodifiers = SDL_getenv("XMODIFIERS");
49#endif
50
51 if (inited == true) {
52 return;
53 }
54
55 inited = true;
56
57 // See if fcitx IME support is being requested
58#ifdef HAVE_FCITX
59 if (!SDL_IME_Init_Real &&
60 ((im_module && SDL_strcmp(im_module, "fcitx") == 0) ||
61 (!im_module && xmodifiers && SDL_strstr(xmodifiers, "@im=fcitx") != NULL))) {
62 SDL_IME_Init_Real = SDL_Fcitx_Init;
63 SDL_IME_Quit_Real = SDL_Fcitx_Quit;
64 SDL_IME_SetFocus_Real = SDL_Fcitx_SetFocus;
65 SDL_IME_Reset_Real = SDL_Fcitx_Reset;
66 SDL_IME_ProcessKeyEvent_Real = SDL_Fcitx_ProcessKeyEvent;
67 SDL_IME_UpdateTextInputArea_Real = SDL_Fcitx_UpdateTextInputArea;
68 SDL_IME_PumpEvents_Real = SDL_Fcitx_PumpEvents;
69 }
70#endif // HAVE_FCITX
71
72 // default to IBus
73#ifdef HAVE_IBUS_IBUS_H
74 if (!SDL_IME_Init_Real) {
75 SDL_IME_Init_Real = SDL_IBus_Init;
76 SDL_IME_Quit_Real = SDL_IBus_Quit;
77 SDL_IME_SetFocus_Real = SDL_IBus_SetFocus;
78 SDL_IME_Reset_Real = SDL_IBus_Reset;
79 SDL_IME_ProcessKeyEvent_Real = SDL_IBus_ProcessKeyEvent;
80 SDL_IME_UpdateTextInputArea_Real = SDL_IBus_UpdateTextInputArea;
81 SDL_IME_PumpEvents_Real = SDL_IBus_PumpEvents;
82 }
83#endif // HAVE_IBUS_IBUS_H
84}
85
86bool SDL_IME_Init(void)
87{
88 InitIME();
89
90 if (SDL_IME_Init_Real) {
91 if (SDL_IME_Init_Real()) {
92 return true;
93 }
94
95 // uhoh, the IME implementation's init failed! Disable IME support.
96 SDL_IME_Init_Real = NULL;
97 SDL_IME_Quit_Real = NULL;
98 SDL_IME_SetFocus_Real = NULL;
99 SDL_IME_Reset_Real = NULL;
100 SDL_IME_ProcessKeyEvent_Real = NULL;
101 SDL_IME_UpdateTextInputArea_Real = NULL;
102 SDL_IME_PumpEvents_Real = NULL;
103 }
104
105 return false;
106}
107
108void SDL_IME_Quit(void)
109{
110 if (SDL_IME_Quit_Real) {
111 SDL_IME_Quit_Real();
112 }
113}
114
115void SDL_IME_SetFocus(bool focused)
116{
117 if (SDL_IME_SetFocus_Real) {
118 SDL_IME_SetFocus_Real(focused);
119 }
120}
121
122void SDL_IME_Reset(void)
123{
124 if (SDL_IME_Reset_Real) {
125 SDL_IME_Reset_Real();
126 }
127}
128
129bool SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, bool down)
130{
131 if (SDL_IME_ProcessKeyEvent_Real) {
132 return SDL_IME_ProcessKeyEvent_Real(keysym, keycode, down);
133 }
134
135 return false;
136}
137
138void SDL_IME_UpdateTextInputArea(SDL_Window *window)
139{
140 if (SDL_IME_UpdateTextInputArea_Real) {
141 SDL_IME_UpdateTextInputArea_Real(window);
142 }
143}
144
145void SDL_IME_PumpEvents(void)
146{
147 if (SDL_IME_PumpEvents_Real) {
148 SDL_IME_PumpEvents_Real();
149 }
150}
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_ime.h b/contrib/SDL-3.2.8/src/core/linux/SDL_ime.h
new file mode 100644
index 0000000..ac192fa
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_ime.h
@@ -0,0 +1,35 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_ime_h_
23#define SDL_ime_h_
24
25#include "SDL_internal.h"
26
27extern bool SDL_IME_Init(void);
28extern void SDL_IME_Quit(void);
29extern void SDL_IME_SetFocus(bool focused);
30extern void SDL_IME_Reset(void);
31extern bool SDL_IME_ProcessKeyEvent(Uint32 keysym, Uint32 keycode, bool down);
32extern void SDL_IME_UpdateTextInputArea(SDL_Window *window);
33extern void SDL_IME_PumpEvents(void);
34
35#endif // SDL_ime_h_
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_system_theme.c b/contrib/SDL-3.2.8/src/core/linux/SDL_system_theme.c
new file mode 100644
index 0000000..6d6087d
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_system_theme.c
@@ -0,0 +1,156 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23#include "SDL_dbus.h"
24#include "SDL_system_theme.h"
25#include "../../video/SDL_sysvideo.h"
26
27#include <unistd.h>
28
29#define PORTAL_DESTINATION "org.freedesktop.portal.Desktop"
30#define PORTAL_PATH "/org/freedesktop/portal/desktop"
31#define PORTAL_INTERFACE "org.freedesktop.portal.Settings"
32#define PORTAL_METHOD "Read"
33
34#define SIGNAL_INTERFACE "org.freedesktop.portal.Settings"
35#define SIGNAL_NAMESPACE "org.freedesktop.appearance"
36#define SIGNAL_NAME "SettingChanged"
37#define SIGNAL_KEY "color-scheme"
38
39typedef struct SystemThemeData
40{
41 SDL_DBusContext *dbus;
42 SDL_SystemTheme theme;
43} SystemThemeData;
44
45static SystemThemeData system_theme_data;
46
47static bool DBus_ExtractThemeVariant(DBusMessageIter *iter, SDL_SystemTheme *theme) {
48 SDL_DBusContext *dbus = system_theme_data.dbus;
49 Uint32 color_scheme;
50 DBusMessageIter variant_iter;
51
52 if (dbus->message_iter_get_arg_type(iter) != DBUS_TYPE_VARIANT)
53 return false;
54 dbus->message_iter_recurse(iter, &variant_iter);
55 if (dbus->message_iter_get_arg_type(&variant_iter) != DBUS_TYPE_UINT32)
56 return false;
57 dbus->message_iter_get_basic(&variant_iter, &color_scheme);
58 switch (color_scheme) {
59 case 0:
60 *theme = SDL_SYSTEM_THEME_UNKNOWN;
61 break;
62 case 1:
63 *theme = SDL_SYSTEM_THEME_DARK;
64 break;
65 case 2:
66 *theme = SDL_SYSTEM_THEME_LIGHT;
67 break;
68 }
69 return true;
70}
71
72static DBusHandlerResult DBus_MessageFilter(DBusConnection *conn, DBusMessage *msg, void *data) {
73 SDL_DBusContext *dbus = (SDL_DBusContext *)data;
74
75 if (dbus->message_is_signal(msg, SIGNAL_INTERFACE, SIGNAL_NAME)) {
76 DBusMessageIter signal_iter;
77 const char *namespace, *key;
78
79 dbus->message_iter_init(msg, &signal_iter);
80 // Check if the parameters are what we expect
81 if (dbus->message_iter_get_arg_type(&signal_iter) != DBUS_TYPE_STRING)
82 goto not_our_signal;
83 dbus->message_iter_get_basic(&signal_iter, &namespace);
84 if (SDL_strcmp(SIGNAL_NAMESPACE, namespace) != 0)
85 goto not_our_signal;
86
87 if (!dbus->message_iter_next(&signal_iter))
88 goto not_our_signal;
89
90 if (dbus->message_iter_get_arg_type(&signal_iter) != DBUS_TYPE_STRING)
91 goto not_our_signal;
92 dbus->message_iter_get_basic(&signal_iter, &key);
93 if (SDL_strcmp(SIGNAL_KEY, key) != 0)
94 goto not_our_signal;
95
96 if (!dbus->message_iter_next(&signal_iter))
97 goto not_our_signal;
98
99 if (!DBus_ExtractThemeVariant(&signal_iter, &system_theme_data.theme))
100 goto not_our_signal;
101
102 SDL_SetSystemTheme(system_theme_data.theme);
103 return DBUS_HANDLER_RESULT_HANDLED;
104 }
105not_our_signal:
106 return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
107}
108
109bool SDL_SystemTheme_Init(void)
110{
111 SDL_DBusContext *dbus = SDL_DBus_GetContext();
112 DBusMessage *msg;
113 static const char *namespace = SIGNAL_NAMESPACE;
114 static const char *key = SIGNAL_KEY;
115
116 system_theme_data.theme = SDL_SYSTEM_THEME_UNKNOWN;
117 system_theme_data.dbus = dbus;
118 if (!dbus) {
119 return false;
120 }
121
122 msg = dbus->message_new_method_call(PORTAL_DESTINATION, PORTAL_PATH, PORTAL_INTERFACE, PORTAL_METHOD);
123 if (msg) {
124 if (dbus->message_append_args(msg, DBUS_TYPE_STRING, &namespace, DBUS_TYPE_STRING, &key, DBUS_TYPE_INVALID)) {
125 DBusMessage *reply = dbus->connection_send_with_reply_and_block(dbus->session_conn, msg, 300, NULL);
126 if (reply) {
127 DBusMessageIter reply_iter, variant_outer_iter;
128
129 dbus->message_iter_init(reply, &reply_iter);
130 // The response has signature <<u>>
131 if (dbus->message_iter_get_arg_type(&reply_iter) != DBUS_TYPE_VARIANT)
132 goto incorrect_type;
133 dbus->message_iter_recurse(&reply_iter, &variant_outer_iter);
134 if (!DBus_ExtractThemeVariant(&variant_outer_iter, &system_theme_data.theme))
135 goto incorrect_type;
136incorrect_type:
137 dbus->message_unref(reply);
138 }
139 }
140 dbus->message_unref(msg);
141 }
142
143 dbus->bus_add_match(dbus->session_conn,
144 "type='signal', interface='"SIGNAL_INTERFACE"',"
145 "member='"SIGNAL_NAME"', arg0='"SIGNAL_NAMESPACE"',"
146 "arg1='"SIGNAL_KEY"'", NULL);
147 dbus->connection_add_filter(dbus->session_conn,
148 &DBus_MessageFilter, dbus, NULL);
149 dbus->connection_flush(dbus->session_conn);
150 return true;
151}
152
153SDL_SystemTheme SDL_SystemTheme_Get(void)
154{
155 return system_theme_data.theme;
156}
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_system_theme.h b/contrib/SDL-3.2.8/src/core/linux/SDL_system_theme.h
new file mode 100644
index 0000000..2cd55cd
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_system_theme.h
@@ -0,0 +1,30 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#ifndef SDL_system_theme_h_
23#define SDL_system_theme_h_
24
25#include "SDL_internal.h"
26
27extern bool SDL_SystemTheme_Init(void);
28extern SDL_SystemTheme SDL_SystemTheme_Get(void);
29
30#endif // SDL_system_theme_h_
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_threadprio.c b/contrib/SDL-3.2.8/src/core/linux/SDL_threadprio.c
new file mode 100644
index 0000000..1a3e22f
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_threadprio.c
@@ -0,0 +1,345 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23#ifdef SDL_PLATFORM_LINUX
24
25#ifndef SDL_THREADS_DISABLED
26#include <sys/time.h>
27#include <sys/resource.h>
28#include <pthread.h>
29#include <sched.h>
30#include <unistd.h>
31
32// RLIMIT_RTTIME requires kernel >= 2.6.25 and is in glibc >= 2.14
33#ifndef RLIMIT_RTTIME
34#define RLIMIT_RTTIME 15
35#endif
36// SCHED_RESET_ON_FORK is in kernel >= 2.6.32.
37#ifndef SCHED_RESET_ON_FORK
38#define SCHED_RESET_ON_FORK 0x40000000
39#endif
40
41#include "SDL_dbus.h"
42
43#ifdef SDL_USE_LIBDBUS
44
45// d-bus queries to org.freedesktop.RealtimeKit1.
46#define RTKIT_DBUS_NODE "org.freedesktop.RealtimeKit1"
47#define RTKIT_DBUS_PATH "/org/freedesktop/RealtimeKit1"
48#define RTKIT_DBUS_INTERFACE "org.freedesktop.RealtimeKit1"
49
50// d-bus queries to the XDG portal interface to RealtimeKit1
51#define XDG_PORTAL_DBUS_NODE "org.freedesktop.portal.Desktop"
52#define XDG_PORTAL_DBUS_PATH "/org/freedesktop/portal/desktop"
53#define XDG_PORTAL_DBUS_INTERFACE "org.freedesktop.portal.Realtime"
54
55static bool rtkit_use_session_conn;
56static const char *rtkit_dbus_node;
57static const char *rtkit_dbus_path;
58static const char *rtkit_dbus_interface;
59
60static pthread_once_t rtkit_initialize_once = PTHREAD_ONCE_INIT;
61static Sint32 rtkit_min_nice_level = -20;
62static Sint32 rtkit_max_realtime_priority = 99;
63static Sint64 rtkit_max_rttime_usec = 200000;
64
65/*
66 * Checking that the RTTimeUSecMax property exists and is an int64 confirms that:
67 * - The desktop portal exists and supports the realtime interface.
68 * - The realtime interface is new enough to have the required bug fixes applied.
69 */
70static bool realtime_portal_supported(DBusConnection *conn)
71{
72 Sint64 res;
73 return SDL_DBus_QueryPropertyOnConnection(conn, XDG_PORTAL_DBUS_NODE, XDG_PORTAL_DBUS_PATH, XDG_PORTAL_DBUS_INTERFACE,
74 "RTTimeUSecMax", DBUS_TYPE_INT64, &res);
75}
76
77static void set_rtkit_interface(void)
78{
79 SDL_DBusContext *dbus = SDL_DBus_GetContext();
80
81 // xdg-desktop-portal works in all instances, so check for it first.
82 if (dbus && realtime_portal_supported(dbus->session_conn)) {
83 rtkit_use_session_conn = true;
84 rtkit_dbus_node = XDG_PORTAL_DBUS_NODE;
85 rtkit_dbus_path = XDG_PORTAL_DBUS_PATH;
86 rtkit_dbus_interface = XDG_PORTAL_DBUS_INTERFACE;
87 } else { // Fall back to the standard rtkit interface in all other cases.
88 rtkit_use_session_conn = false;
89 rtkit_dbus_node = RTKIT_DBUS_NODE;
90 rtkit_dbus_path = RTKIT_DBUS_PATH;
91 rtkit_dbus_interface = RTKIT_DBUS_INTERFACE;
92 }
93}
94
95static DBusConnection *get_rtkit_dbus_connection(void)
96{
97 SDL_DBusContext *dbus = SDL_DBus_GetContext();
98
99 if (dbus) {
100 return rtkit_use_session_conn ? dbus->session_conn : dbus->system_conn;
101 }
102
103 return NULL;
104}
105
106static void rtkit_initialize(void)
107{
108 DBusConnection *dbus_conn;
109
110 set_rtkit_interface();
111 dbus_conn = get_rtkit_dbus_connection();
112
113 // Try getting minimum nice level: this is often greater than PRIO_MIN (-20).
114 if (!dbus_conn || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MinNiceLevel",
115 DBUS_TYPE_INT32, &rtkit_min_nice_level)) {
116 rtkit_min_nice_level = -20;
117 }
118
119 // Try getting maximum realtime priority: this can be less than the POSIX default (99).
120 if (!dbus_conn || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MaxRealtimePriority",
121 DBUS_TYPE_INT32, &rtkit_max_realtime_priority)) {
122 rtkit_max_realtime_priority = 99;
123 }
124
125 // Try getting maximum rttime allowed by rtkit: exceeding this value will result in SIGKILL
126 if (!dbus_conn || !SDL_DBus_QueryPropertyOnConnection(dbus_conn, rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "RTTimeUSecMax",
127 DBUS_TYPE_INT64, &rtkit_max_rttime_usec)) {
128 rtkit_max_rttime_usec = 200000;
129 }
130}
131
132static bool rtkit_initialize_realtime_thread(void)
133{
134 // Following is an excerpt from rtkit README that outlines the requirements
135 // a thread must meet before making rtkit requests:
136 //
137 // * Only clients with RLIMIT_RTTIME set will get RT scheduling
138 //
139 // * RT scheduling will only be handed out to processes with
140 // SCHED_RESET_ON_FORK set to guarantee that the scheduling
141 // settings cannot 'leak' to child processes, thus making sure
142 // that 'RT fork bombs' cannot be used to bypass RLIMIT_RTTIME
143 // and take the system down.
144 //
145 // * Limits are enforced on all user controllable resources, only
146 // a maximum number of users, processes, threads can request RT
147 // scheduling at the same time.
148 //
149 // * Only a limited number of threads may be made RT in a
150 // specific time frame.
151 //
152 // * Client authorization is verified with PolicyKit
153
154 int err;
155 struct rlimit rlimit;
156 int nLimit = RLIMIT_RTTIME;
157 pid_t nPid = 0; // self
158 int nSchedPolicy = sched_getscheduler(nPid) | SCHED_RESET_ON_FORK;
159 struct sched_param schedParam;
160
161 SDL_zero(schedParam);
162
163 // Requirement #1: Set RLIMIT_RTTIME
164 err = getrlimit(nLimit, &rlimit);
165 if (err) {
166 return false;
167 }
168
169 // Current rtkit allows a max of 200ms right now
170 rlimit.rlim_max = rtkit_max_rttime_usec;
171 rlimit.rlim_cur = rlimit.rlim_max / 2;
172 err = setrlimit(nLimit, &rlimit);
173 if (err) {
174 return false;
175 }
176
177 // Requirement #2: Add SCHED_RESET_ON_FORK to the scheduler policy
178 err = sched_getparam(nPid, &schedParam);
179 if (err) {
180 return false;
181 }
182
183 err = sched_setscheduler(nPid, nSchedPolicy, &schedParam);
184 if (err) {
185 return false;
186 }
187
188 return true;
189}
190
191static bool rtkit_setpriority_nice(pid_t thread, int nice_level)
192{
193 DBusConnection *dbus_conn;
194 Uint64 pid = (Uint64)getpid();
195 Uint64 tid = (Uint64)thread;
196 Sint32 nice = (Sint32)nice_level;
197
198 pthread_once(&rtkit_initialize_once, rtkit_initialize);
199 dbus_conn = get_rtkit_dbus_connection();
200
201 if (nice < rtkit_min_nice_level) {
202 nice = rtkit_min_nice_level;
203 }
204
205 if (!dbus_conn || !SDL_DBus_CallMethodOnConnection(dbus_conn,
206 rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MakeThreadHighPriorityWithPID",
207 DBUS_TYPE_UINT64, &pid, DBUS_TYPE_UINT64, &tid, DBUS_TYPE_INT32, &nice, DBUS_TYPE_INVALID,
208 DBUS_TYPE_INVALID)) {
209 return false;
210 }
211 return true;
212}
213
214static bool rtkit_setpriority_realtime(pid_t thread, int rt_priority)
215{
216 DBusConnection *dbus_conn;
217 Uint64 pid = (Uint64)getpid();
218 Uint64 tid = (Uint64)thread;
219 Uint32 priority = (Uint32)rt_priority;
220
221 pthread_once(&rtkit_initialize_once, rtkit_initialize);
222 dbus_conn = get_rtkit_dbus_connection();
223
224 if (priority > rtkit_max_realtime_priority) {
225 priority = rtkit_max_realtime_priority;
226 }
227
228 // We always perform the thread state changes necessary for rtkit.
229 // This wastes some system calls if the state is already set but
230 // typically code sets a thread priority and leaves it so it's
231 // not expected that this wasted effort will be an issue.
232 // We also do not quit if this fails, we let the rtkit request
233 // go through to determine whether it really needs to fail or not.
234 rtkit_initialize_realtime_thread();
235
236 if (!dbus_conn || !SDL_DBus_CallMethodOnConnection(dbus_conn,
237 rtkit_dbus_node, rtkit_dbus_path, rtkit_dbus_interface, "MakeThreadRealtimeWithPID",
238 DBUS_TYPE_UINT64, &pid, DBUS_TYPE_UINT64, &tid, DBUS_TYPE_UINT32, &priority, DBUS_TYPE_INVALID,
239 DBUS_TYPE_INVALID)) {
240 return false;
241 }
242 return true;
243}
244#else
245
246#define rtkit_max_realtime_priority 99
247
248#endif // dbus
249#endif // threads
250
251// this is a public symbol, so it has to exist even if threads are disabled.
252bool SDL_SetLinuxThreadPriority(Sint64 threadID, int priority)
253{
254#ifdef SDL_THREADS_DISABLED
255 return SDL_Unsupported();
256#else
257 if (setpriority(PRIO_PROCESS, (id_t)threadID, priority) == 0) {
258 return true;
259 }
260
261#ifdef SDL_USE_LIBDBUS
262 /* Note that this fails you most likely:
263 * Have your process's scheduler incorrectly configured.
264 See the requirements at:
265 http://git.0pointer.net/rtkit.git/tree/README#n16
266 * Encountered dbus/polkit security restrictions. Note
267 that the RealtimeKit1 dbus endpoint is inaccessible
268 over ssh connections for most common distro configs.
269 You might want to check your local config for details:
270 /usr/share/polkit-1/actions/org.freedesktop.RealtimeKit1.policy
271
272 README and sample code at: http://git.0pointer.net/rtkit.git
273 */
274 if (rtkit_setpriority_nice((pid_t)threadID, priority)) {
275 return true;
276 }
277#endif
278
279 return SDL_SetError("setpriority() failed");
280#endif
281}
282
283// this is a public symbol, so it has to exist even if threads are disabled.
284bool SDL_SetLinuxThreadPriorityAndPolicy(Sint64 threadID, int sdlPriority, int schedPolicy)
285{
286#ifdef SDL_THREADS_DISABLED
287 return SDL_Unsupported();
288#else
289 int osPriority;
290
291 if (schedPolicy == SCHED_RR || schedPolicy == SCHED_FIFO) {
292 if (sdlPriority == SDL_THREAD_PRIORITY_LOW) {
293 osPriority = 1;
294 } else if (sdlPriority == SDL_THREAD_PRIORITY_HIGH) {
295 osPriority = rtkit_max_realtime_priority * 3 / 4;
296 } else if (sdlPriority == SDL_THREAD_PRIORITY_TIME_CRITICAL) {
297 osPriority = rtkit_max_realtime_priority;
298 } else {
299 osPriority = rtkit_max_realtime_priority / 2;
300 }
301 } else {
302 if (sdlPriority == SDL_THREAD_PRIORITY_LOW) {
303 osPriority = 19;
304 } else if (sdlPriority == SDL_THREAD_PRIORITY_HIGH) {
305 osPriority = -10;
306 } else if (sdlPriority == SDL_THREAD_PRIORITY_TIME_CRITICAL) {
307 osPriority = -20;
308 } else {
309 osPriority = 0;
310 }
311
312 if (setpriority(PRIO_PROCESS, (id_t)threadID, osPriority) == 0) {
313 return true;
314 }
315 }
316
317#ifdef SDL_USE_LIBDBUS
318 /* Note that this fails you most likely:
319 * Have your process's scheduler incorrectly configured.
320 See the requirements at:
321 http://git.0pointer.net/rtkit.git/tree/README#n16
322 * Encountered dbus/polkit security restrictions. Note
323 that the RealtimeKit1 dbus endpoint is inaccessible
324 over ssh connections for most common distro configs.
325 You might want to check your local config for details:
326 /usr/share/polkit-1/actions/org.freedesktop.RealtimeKit1.policy
327
328 README and sample code at: http://git.0pointer.net/rtkit.git
329 */
330 if (schedPolicy == SCHED_RR || schedPolicy == SCHED_FIFO) {
331 if (rtkit_setpriority_realtime((pid_t)threadID, osPriority)) {
332 return true;
333 }
334 } else {
335 if (rtkit_setpriority_nice((pid_t)threadID, osPriority)) {
336 return true;
337 }
338 }
339#endif
340
341 return SDL_SetError("setpriority() failed");
342#endif
343}
344
345#endif // SDL_PLATFORM_LINUX
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_udev.c b/contrib/SDL-3.2.8/src/core/linux/SDL_udev.c
new file mode 100644
index 0000000..907c34c
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_udev.c
@@ -0,0 +1,596 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21#include "SDL_internal.h"
22
23/*
24 * To list the properties of a device, try something like:
25 * udevadm info -a -n snd/hwC0D0 (for a sound card)
26 * udevadm info --query=all -n input/event3 (for a keyboard, mouse, etc)
27 * udevadm info --query=property -n input/event2
28 */
29#include "SDL_udev.h"
30
31#ifdef SDL_USE_LIBUDEV
32
33#include <linux/input.h>
34#include <sys/stat.h>
35
36#include "SDL_evdev_capabilities.h"
37#include "../unix/SDL_poll.h"
38
39static const char *SDL_UDEV_LIBS[] = { "libudev.so.1", "libudev.so.0" };
40
41static SDL_UDEV_PrivateData *_this = NULL;
42
43static bool SDL_UDEV_load_sym(const char *fn, void **addr);
44static bool SDL_UDEV_load_syms(void);
45static bool SDL_UDEV_hotplug_update_available(void);
46static void get_caps(struct udev_device *dev, struct udev_device *pdev, const char *attr, unsigned long *bitmask, size_t bitmask_len);
47static int guess_device_class(struct udev_device *dev);
48static int device_class(struct udev_device *dev);
49static void device_event(SDL_UDEV_deviceevent type, struct udev_device *dev);
50
51static bool SDL_UDEV_load_sym(const char *fn, void **addr)
52{
53 *addr = SDL_LoadFunction(_this->udev_handle, fn);
54 if (!*addr) {
55 // Don't call SDL_SetError(): SDL_LoadFunction already did.
56 return false;
57 }
58
59 return true;
60}
61
62static bool SDL_UDEV_load_syms(void)
63{
64/* cast funcs to char* first, to please GCC's strict aliasing rules. */
65#define SDL_UDEV_SYM(x) \
66 if (!SDL_UDEV_load_sym(#x, (void **)(char *)&_this->syms.x)) \
67 return false
68
69 SDL_UDEV_SYM(udev_device_get_action);
70 SDL_UDEV_SYM(udev_device_get_devnode);
71 SDL_UDEV_SYM(udev_device_get_syspath);
72 SDL_UDEV_SYM(udev_device_get_subsystem);
73 SDL_UDEV_SYM(udev_device_get_parent_with_subsystem_devtype);
74 SDL_UDEV_SYM(udev_device_get_property_value);
75 SDL_UDEV_SYM(udev_device_get_sysattr_value);
76 SDL_UDEV_SYM(udev_device_new_from_syspath);
77 SDL_UDEV_SYM(udev_device_unref);
78 SDL_UDEV_SYM(udev_enumerate_add_match_property);
79 SDL_UDEV_SYM(udev_enumerate_add_match_subsystem);
80 SDL_UDEV_SYM(udev_enumerate_get_list_entry);
81 SDL_UDEV_SYM(udev_enumerate_new);
82 SDL_UDEV_SYM(udev_enumerate_scan_devices);
83 SDL_UDEV_SYM(udev_enumerate_unref);
84 SDL_UDEV_SYM(udev_list_entry_get_name);
85 SDL_UDEV_SYM(udev_list_entry_get_next);
86 SDL_UDEV_SYM(udev_monitor_enable_receiving);
87 SDL_UDEV_SYM(udev_monitor_filter_add_match_subsystem_devtype);
88 SDL_UDEV_SYM(udev_monitor_get_fd);
89 SDL_UDEV_SYM(udev_monitor_new_from_netlink);
90 SDL_UDEV_SYM(udev_monitor_receive_device);
91 SDL_UDEV_SYM(udev_monitor_unref);
92 SDL_UDEV_SYM(udev_new);
93 SDL_UDEV_SYM(udev_unref);
94 SDL_UDEV_SYM(udev_device_new_from_devnum);
95 SDL_UDEV_SYM(udev_device_get_devnum);
96#undef SDL_UDEV_SYM
97
98 return true;
99}
100
101static bool SDL_UDEV_hotplug_update_available(void)
102{
103 if (_this->udev_mon) {
104 const int fd = _this->syms.udev_monitor_get_fd(_this->udev_mon);
105 if (SDL_IOReady(fd, SDL_IOR_READ, 0)) {
106 return true;
107 }
108 }
109 return false;
110}
111
112bool SDL_UDEV_Init(void)
113{
114 if (!_this) {
115 _this = (SDL_UDEV_PrivateData *)SDL_calloc(1, sizeof(*_this));
116 if (!_this) {
117 return false;
118 }
119
120 if (!SDL_UDEV_LoadLibrary()) {
121 SDL_UDEV_Quit();
122 return false;
123 }
124
125 /* Set up udev monitoring
126 * Listen for input devices (mouse, keyboard, joystick, etc) and sound devices
127 */
128
129 _this->udev = _this->syms.udev_new();
130 if (!_this->udev) {
131 SDL_UDEV_Quit();
132 return SDL_SetError("udev_new() failed");
133 }
134
135 _this->udev_mon = _this->syms.udev_monitor_new_from_netlink(_this->udev, "udev");
136 if (!_this->udev_mon) {
137 SDL_UDEV_Quit();
138 return SDL_SetError("udev_monitor_new_from_netlink() failed");
139 }
140
141 _this->syms.udev_monitor_filter_add_match_subsystem_devtype(_this->udev_mon, "input", NULL);
142 _this->syms.udev_monitor_filter_add_match_subsystem_devtype(_this->udev_mon, "sound", NULL);
143 _this->syms.udev_monitor_filter_add_match_subsystem_devtype(_this->udev_mon, "video4linux", NULL);
144 _this->syms.udev_monitor_enable_receiving(_this->udev_mon);
145
146 // Do an initial scan of existing devices
147 SDL_UDEV_Scan();
148 }
149
150 _this->ref_count += 1;
151
152 return true;
153}
154
155void SDL_UDEV_Quit(void)
156{
157 if (!_this) {
158 return;
159 }
160
161 _this->ref_count -= 1;
162
163 if (_this->ref_count < 1) {
164
165 if (_this->udev_mon) {
166 _this->syms.udev_monitor_unref(_this->udev_mon);
167 _this->udev_mon = NULL;
168 }
169 if (_this->udev) {
170 _this->syms.udev_unref(_this->udev);
171 _this->udev = NULL;
172 }
173
174 // Remove existing devices
175 while (_this->first) {
176 SDL_UDEV_CallbackList *item = _this->first;
177 _this->first = _this->first->next;
178 SDL_free(item);
179 }
180
181 SDL_UDEV_UnloadLibrary();
182 SDL_free(_this);
183 _this = NULL;
184 }
185}
186
187bool SDL_UDEV_Scan(void)
188{
189 struct udev_enumerate *enumerate = NULL;
190 struct udev_list_entry *devs = NULL;
191 struct udev_list_entry *item = NULL;
192
193 if (!_this) {
194 return true;
195 }
196
197 enumerate = _this->syms.udev_enumerate_new(_this->udev);
198 if (!enumerate) {
199 SDL_UDEV_Quit();
200 return SDL_SetError("udev_enumerate_new() failed");
201 }
202
203 _this->syms.udev_enumerate_add_match_subsystem(enumerate, "input");
204 _this->syms.udev_enumerate_add_match_subsystem(enumerate, "sound");
205 _this->syms.udev_enumerate_add_match_subsystem(enumerate, "video4linux");
206
207 _this->syms.udev_enumerate_scan_devices(enumerate);
208 devs = _this->syms.udev_enumerate_get_list_entry(enumerate);
209 for (item = devs; item; item = _this->syms.udev_list_entry_get_next(item)) {
210 const char *path = _this->syms.udev_list_entry_get_name(item);
211 struct udev_device *dev = _this->syms.udev_device_new_from_syspath(_this->udev, path);
212 if (dev) {
213 device_event(SDL_UDEV_DEVICEADDED, dev);
214 _this->syms.udev_device_unref(dev);
215 }
216 }
217
218 _this->syms.udev_enumerate_unref(enumerate);
219 return true;
220}
221
222bool SDL_UDEV_GetProductInfo(const char *device_path, Uint16 *vendor, Uint16 *product, Uint16 *version, int *class)
223{
224 struct stat statbuf;
225 char type;
226 struct udev_device *dev;
227 const char* val;
228 int class_temp;
229
230 if (!_this) {
231 return false;
232 }
233
234 if (stat(device_path, &statbuf) == -1) {
235 return false;
236 }
237
238 if (S_ISBLK(statbuf.st_mode)) {
239 type = 'b';
240 }
241 else if (S_ISCHR(statbuf.st_mode)) {
242 type = 'c';
243 }
244 else {
245 return false;
246 }
247
248 dev = _this->syms.udev_device_new_from_devnum(_this->udev, type, statbuf.st_rdev);
249
250 if (!dev) {
251 return false;
252 }
253
254 val = _this->syms.udev_device_get_property_value(dev, "ID_VENDOR_ID");
255 if (val) {
256 *vendor = (Uint16)SDL_strtol(val, NULL, 16);
257 }
258
259 val = _this->syms.udev_device_get_property_value(dev, "ID_MODEL_ID");
260 if (val) {
261 *product = (Uint16)SDL_strtol(val, NULL, 16);
262 }
263
264 val = _this->syms.udev_device_get_property_value(dev, "ID_REVISION");
265 if (val) {
266 *version = (Uint16)SDL_strtol(val, NULL, 16);
267 }
268
269 class_temp = device_class(dev);
270 if (class_temp) {
271 *class = class_temp;
272 }
273
274 _this->syms.udev_device_unref(dev);
275
276 return true;
277}
278
279void SDL_UDEV_UnloadLibrary(void)
280{
281 if (!_this) {
282 return;
283 }
284
285 if (_this->udev_handle) {
286 SDL_UnloadObject(_this->udev_handle);
287 _this->udev_handle = NULL;
288 }
289}
290
291bool SDL_UDEV_LoadLibrary(void)
292{
293 bool result = true;
294
295 if (!_this) {
296 return SDL_SetError("UDEV not initialized");
297 }
298
299 // See if there is a udev library already loaded
300 if (SDL_UDEV_load_syms()) {
301 return true;
302 }
303
304#ifdef SDL_UDEV_DYNAMIC
305 // Check for the build environment's libudev first
306 if (!_this->udev_handle) {
307 _this->udev_handle = SDL_LoadObject(SDL_UDEV_DYNAMIC);
308 if (_this->udev_handle) {
309 result = SDL_UDEV_load_syms();
310 if (!result) {
311 SDL_UDEV_UnloadLibrary();
312 }
313 }
314 }
315#endif
316
317 if (!_this->udev_handle) {
318 for (int i = 0; i < SDL_arraysize(SDL_UDEV_LIBS); i++) {
319 _this->udev_handle = SDL_LoadObject(SDL_UDEV_LIBS[i]);
320 if (_this->udev_handle) {
321 result = SDL_UDEV_load_syms();
322 if (!result) {
323 SDL_UDEV_UnloadLibrary();
324 } else {
325 break;
326 }
327 }
328 }
329
330 if (!_this->udev_handle) {
331 result = false;
332 // Don't call SDL_SetError(): SDL_LoadObject already did.
333 }
334 }
335
336 return result;
337}
338
339static void get_caps(struct udev_device *dev, struct udev_device *pdev, const char *attr, unsigned long *bitmask, size_t bitmask_len)
340{
341 const char *value;
342 char text[4096];
343 char *word;
344 int i;
345 unsigned long v;
346
347 SDL_memset(bitmask, 0, bitmask_len * sizeof(*bitmask));
348 value = _this->syms.udev_device_get_sysattr_value(pdev, attr);
349 if (!value) {
350 return;
351 }
352
353 SDL_strlcpy(text, value, sizeof(text));
354 i = 0;
355 while ((word = SDL_strrchr(text, ' ')) != NULL) {
356 v = SDL_strtoul(word + 1, NULL, 16);
357 if (i < bitmask_len) {
358 bitmask[i] = v;
359 }
360 ++i;
361 *word = '\0';
362 }
363 v = SDL_strtoul(text, NULL, 16);
364 if (i < bitmask_len) {
365 bitmask[i] = v;
366 }
367}
368
369static int guess_device_class(struct udev_device *dev)
370{
371 struct udev_device *pdev;
372 unsigned long bitmask_props[NBITS(INPUT_PROP_MAX)];
373 unsigned long bitmask_ev[NBITS(EV_MAX)];
374 unsigned long bitmask_abs[NBITS(ABS_MAX)];
375 unsigned long bitmask_key[NBITS(KEY_MAX)];
376 unsigned long bitmask_rel[NBITS(REL_MAX)];
377
378 /* walk up the parental chain until we find the real input device; the
379 * argument is very likely a subdevice of this, like eventN */
380 pdev = dev;
381 while (pdev && !_this->syms.udev_device_get_sysattr_value(pdev, "capabilities/ev")) {
382 pdev = _this->syms.udev_device_get_parent_with_subsystem_devtype(pdev, "input", NULL);
383 }
384 if (!pdev) {
385 return 0;
386 }
387
388 get_caps(dev, pdev, "properties", bitmask_props, SDL_arraysize(bitmask_props));
389 get_caps(dev, pdev, "capabilities/ev", bitmask_ev, SDL_arraysize(bitmask_ev));
390 get_caps(dev, pdev, "capabilities/abs", bitmask_abs, SDL_arraysize(bitmask_abs));
391 get_caps(dev, pdev, "capabilities/rel", bitmask_rel, SDL_arraysize(bitmask_rel));
392 get_caps(dev, pdev, "capabilities/key", bitmask_key, SDL_arraysize(bitmask_key));
393
394 return SDL_EVDEV_GuessDeviceClass(&bitmask_props[0],
395 &bitmask_ev[0],
396 &bitmask_abs[0],
397 &bitmask_key[0],
398 &bitmask_rel[0]);
399}
400
401static int device_class(struct udev_device *dev)
402{
403 const char *subsystem;
404 const char *val = NULL;
405 int devclass = 0;
406
407 subsystem = _this->syms.udev_device_get_subsystem(dev);
408 if (!subsystem) {
409 return 0;
410 }
411
412 if (SDL_strcmp(subsystem, "sound") == 0) {
413 devclass = SDL_UDEV_DEVICE_SOUND;
414 } else if (SDL_strcmp(subsystem, "video4linux") == 0) {
415 val = _this->syms.udev_device_get_property_value(dev, "ID_V4L_CAPABILITIES");
416 if (val && SDL_strcasestr(val, "capture")) {
417 devclass = SDL_UDEV_DEVICE_VIDEO_CAPTURE;
418 }
419 } else if (SDL_strcmp(subsystem, "input") == 0) {
420 // udev rules reference: http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-input_id.c
421
422 val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_JOYSTICK");
423 if (val && SDL_strcmp(val, "1") == 0) {
424 devclass |= SDL_UDEV_DEVICE_JOYSTICK;
425 }
426
427 val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_ACCELEROMETER");
428 if (val && SDL_strcmp(val, "1") == 0) {
429 devclass |= SDL_UDEV_DEVICE_ACCELEROMETER;
430 }
431
432 val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_MOUSE");
433 if (val && SDL_strcmp(val, "1") == 0) {
434 devclass |= SDL_UDEV_DEVICE_MOUSE;
435 }
436
437 val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_TOUCHSCREEN");
438 if (val && SDL_strcmp(val, "1") == 0) {
439 devclass |= SDL_UDEV_DEVICE_TOUCHSCREEN;
440 }
441
442 /* The undocumented rule is:
443 - All devices with keys get ID_INPUT_KEY
444 - From this subset, if they have ESC, numbers, and Q to D, it also gets ID_INPUT_KEYBOARD
445
446 Ref: http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-input_id.c#n183
447 */
448 val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_KEY");
449 if (val && SDL_strcmp(val, "1") == 0) {
450 devclass |= SDL_UDEV_DEVICE_HAS_KEYS;
451 }
452
453 val = _this->syms.udev_device_get_property_value(dev, "ID_INPUT_KEYBOARD");
454 if (val && SDL_strcmp(val, "1") == 0) {
455 devclass |= SDL_UDEV_DEVICE_KEYBOARD;
456 }
457
458 if (devclass == 0) {
459 // Fall back to old style input classes
460 val = _this->syms.udev_device_get_property_value(dev, "ID_CLASS");
461 if (val) {
462 if (SDL_strcmp(val, "joystick") == 0) {
463 devclass = SDL_UDEV_DEVICE_JOYSTICK;
464 } else if (SDL_strcmp(val, "mouse") == 0) {
465 devclass = SDL_UDEV_DEVICE_MOUSE;
466 } else if (SDL_strcmp(val, "kbd") == 0) {
467 devclass = SDL_UDEV_DEVICE_HAS_KEYS | SDL_UDEV_DEVICE_KEYBOARD;
468 }
469 } else {
470 // We could be linked with libudev on a system that doesn't have udev running
471 devclass = guess_device_class(dev);
472 }
473 }
474 }
475
476 return devclass;
477}
478
479static void device_event(SDL_UDEV_deviceevent type, struct udev_device *dev)
480{
481 int devclass = 0;
482 const char *path;
483 SDL_UDEV_CallbackList *item;
484
485 path = _this->syms.udev_device_get_devnode(dev);
486 if (!path) {
487 return;
488 }
489
490 if (type == SDL_UDEV_DEVICEADDED) {
491 devclass = device_class(dev);
492 if (!devclass) {
493 return;
494 }
495 } else {
496 // The device has been removed, the class isn't available
497 }
498
499 // Process callbacks
500 for (item = _this->first; item; item = item->next) {
501 item->callback(type, devclass, path);
502 }
503}
504
505void SDL_UDEV_Poll(void)
506{
507 struct udev_device *dev = NULL;
508 const char *action = NULL;
509
510 if (!_this) {
511 return;
512 }
513
514 while (SDL_UDEV_hotplug_update_available()) {
515 dev = _this->syms.udev_monitor_receive_device(_this->udev_mon);
516 if (!dev) {
517 break;
518 }
519 action = _this->syms.udev_device_get_action(dev);
520
521 if (action) {
522 if (SDL_strcmp(action, "add") == 0) {
523 device_event(SDL_UDEV_DEVICEADDED, dev);
524 } else if (SDL_strcmp(action, "remove") == 0) {
525 device_event(SDL_UDEV_DEVICEREMOVED, dev);
526 }
527 }
528
529 _this->syms.udev_device_unref(dev);
530 }
531}
532
533bool SDL_UDEV_AddCallback(SDL_UDEV_Callback cb)
534{
535 SDL_UDEV_CallbackList *item;
536 item = (SDL_UDEV_CallbackList *)SDL_calloc(1, sizeof(SDL_UDEV_CallbackList));
537 if (!item) {
538 return false;
539 }
540
541 item->callback = cb;
542
543 if (!_this->last) {
544 _this->first = _this->last = item;
545 } else {
546 _this->last->next = item;
547 _this->last = item;
548 }
549
550 return true;
551}
552
553void SDL_UDEV_DelCallback(SDL_UDEV_Callback cb)
554{
555 SDL_UDEV_CallbackList *item;
556 SDL_UDEV_CallbackList *prev = NULL;
557
558 if (!_this) {
559 return;
560 }
561
562 for (item = _this->first; item; item = item->next) {
563 // found it, remove it.
564 if (item->callback == cb) {
565 if (prev) {
566 prev->next = item->next;
567 } else {
568 SDL_assert(_this->first == item);
569 _this->first = item->next;
570 }
571 if (item == _this->last) {
572 _this->last = prev;
573 }
574 SDL_free(item);
575 return;
576 }
577 prev = item;
578 }
579}
580
581const SDL_UDEV_Symbols *SDL_UDEV_GetUdevSyms(void)
582{
583 if (!SDL_UDEV_Init()) {
584 SDL_SetError("Could not initialize UDEV");
585 return NULL;
586 }
587
588 return &_this->syms;
589}
590
591void SDL_UDEV_ReleaseUdevSyms(void)
592{
593 SDL_UDEV_Quit();
594}
595
596#endif // SDL_USE_LIBUDEV
diff --git a/contrib/SDL-3.2.8/src/core/linux/SDL_udev.h b/contrib/SDL-3.2.8/src/core/linux/SDL_udev.h
new file mode 100644
index 0000000..738f4ba
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/core/linux/SDL_udev.h
@@ -0,0 +1,113 @@
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
22#include "SDL_internal.h"
23
24#ifndef SDL_udev_h_
25#define SDL_udev_h_
26
27#if defined(HAVE_LIBUDEV_H) && defined(HAVE_LINUX_INPUT_H)
28
29#ifndef SDL_USE_LIBUDEV
30#define SDL_USE_LIBUDEV 1
31#endif
32
33#include <libudev.h>
34#include <sys/time.h>
35#include <sys/types.h>
36
37/**
38 * Device type
39 */
40
41typedef enum
42{
43 SDL_UDEV_DEVICEADDED = 1,
44 SDL_UDEV_DEVICEREMOVED
45} SDL_UDEV_deviceevent;
46
47typedef void (*SDL_UDEV_Callback)(SDL_UDEV_deviceevent udev_type, int udev_class, const char *devpath);
48
49typedef struct SDL_UDEV_CallbackList
50{
51 SDL_UDEV_Callback callback;
52 struct SDL_UDEV_CallbackList *next;
53} SDL_UDEV_CallbackList;
54
55typedef struct SDL_UDEV_Symbols
56{
57 const char *(*udev_device_get_action)(struct udev_device *);
58 const char *(*udev_device_get_devnode)(struct udev_device *);
59 const char *(*udev_device_get_syspath)(struct udev_device *);
60 const char *(*udev_device_get_subsystem)(struct udev_device *);
61 struct udev_device *(*udev_device_get_parent_with_subsystem_devtype)(struct udev_device *udev_device, const char *subsystem, const char *devtype);
62 const char *(*udev_device_get_property_value)(struct udev_device *, const char *);
63 const char *(*udev_device_get_sysattr_value)(struct udev_device *udev_device, const char *sysattr);
64 struct udev_device *(*udev_device_new_from_syspath)(struct udev *, const char *);
65 void (*udev_device_unref)(struct udev_device *);
66 int (*udev_enumerate_add_match_property)(struct udev_enumerate *, const char *, const char *);
67 int (*udev_enumerate_add_match_subsystem)(struct udev_enumerate *, const char *);
68 struct udev_list_entry *(*udev_enumerate_get_list_entry)(struct udev_enumerate *);
69 struct udev_enumerate *(*udev_enumerate_new)(struct udev *);
70 int (*udev_enumerate_scan_devices)(struct udev_enumerate *);
71 void (*udev_enumerate_unref)(struct udev_enumerate *);
72 const char *(*udev_list_entry_get_name)(struct udev_list_entry *);
73 struct udev_list_entry *(*udev_list_entry_get_next)(struct udev_list_entry *);
74 int (*udev_monitor_enable_receiving)(struct udev_monitor *);
75 int (*udev_monitor_filter_add_match_subsystem_devtype)(struct udev_monitor *, const char *, const char *);
76 int (*udev_monitor_get_fd)(struct udev_monitor *);
77 struct udev_monitor *(*udev_monitor_new_from_netlink)(struct udev *, const char *);
78 struct udev_device *(*udev_monitor_receive_device)(struct udev_monitor *);
79 void (*udev_monitor_unref)(struct udev_monitor *);
80 struct udev *(*udev_new)(void);
81 void (*udev_unref)(struct udev *);
82 struct udev_device *(*udev_device_new_from_devnum)(struct udev *udev, char type, dev_t devnum);
83 dev_t (*udev_device_get_devnum)(struct udev_device *udev_device);
84} SDL_UDEV_Symbols;
85
86typedef struct SDL_UDEV_PrivateData
87{
88 const char *udev_library;
89 SDL_SharedObject *udev_handle;
90 struct udev *udev;
91 struct udev_monitor *udev_mon;
92 int ref_count;
93 SDL_UDEV_CallbackList *first, *last;
94
95 // Function pointers
96 SDL_UDEV_Symbols syms;
97} SDL_UDEV_PrivateData;
98
99extern bool SDL_UDEV_Init(void);
100extern void SDL_UDEV_Quit(void);
101extern void SDL_UDEV_UnloadLibrary(void);
102extern bool SDL_UDEV_LoadLibrary(void);
103extern void SDL_UDEV_Poll(void);
104extern bool SDL_UDEV_Scan(void);
105extern bool SDL_UDEV_GetProductInfo(const char *device_path, Uint16 *vendor, Uint16 *product, Uint16 *version, int *class);
106extern bool SDL_UDEV_AddCallback(SDL_UDEV_Callback cb);
107extern void SDL_UDEV_DelCallback(SDL_UDEV_Callback cb);
108extern const SDL_UDEV_Symbols *SDL_UDEV_GetUdevSyms(void);
109extern void SDL_UDEV_ReleaseUdevSyms(void);
110
111#endif // HAVE_LIBUDEV_H && HAVE_LINUX_INPUT_H
112
113#endif // SDL_udev_h_