Skip to content
Permalink
Browse files

We only need the first few keymaps corresponding to the following con…

…stants:

K_NORMTAB, K_SHIFTTAB, K_ALTTAB, K_ALTSHIFTTAB

In the normal case we'll load all the keymaps from the kernel, but this reduces the size of the SDL library for the fallback case when we can't get to the tty.
  • Loading branch information
slouken committed Jan 9, 2017
1 parent 6d6edcb commit ad7c26ff02719bd16ac05e3f8dd03c6fd11ce5aa
Showing with 129 additions and 0 deletions.
  1. +129 −0 src/core/linux/SDL_evdev_kbd_default_keymap.h
@@ -155,6 +155,7 @@ static unsigned short default_key_map_3[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
#ifdef INCLUDE_EXTENDED_KEYMAP
static unsigned short default_key_map_4[NR_KEYS] = {
0xf200, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e,
0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009,
@@ -4371,12 +4372,14 @@ static unsigned short default_key_map_127[NR_KEYS] = {
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200,
};
#endif /* INCLUDE_EXTENDED_KEYMAP */

static unsigned short *default_key_maps[MAX_NR_KEYMAPS] = {
default_key_map_0,
default_key_map_1,
default_key_map_2,
default_key_map_3,
#ifdef INCLUDE_EXTENDED_KEYMAP
default_key_map_4,
default_key_map_5,
default_key_map_6,
@@ -4501,6 +4504,132 @@ static unsigned short *default_key_maps[MAX_NR_KEYMAPS] = {
default_key_map_125,
default_key_map_126,
default_key_map_127,
#else /* !INCLUDE_EXTENDED_KEYMAP */
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
#endif /* INCLUDE_EXTENDED_KEYMAP */
NULL,
NULL,
NULL,

0 comments on commit ad7c26f

Please sign in to comment.