Skip to content

Commit

Permalink
We only need the first few keymaps corresponding to the following con…
Browse files Browse the repository at this point in the history
…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 ad7c26f
Showing 1 changed file with 129 additions and 0 deletions.
129 changes: 129 additions & 0 deletions src/core/linux/SDL_evdev_kbd_default_keymap.h
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit ad7c26f

Please sign in to comment.