We only need the first few keymaps corresponding to the following constants:
authorSam Lantinga <slouken@libsdl.org>
Mon, 09 Jan 2017 11:58:01 -0800
changeset 108026afc9b833867
parent 10801 4e2e979bdbee
child 10803 fda48e7c29e8
We only need the first few keymaps corresponding to the following constants:
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.
src/core/linux/SDL_evdev_kbd_default_keymap.h
     1.1 --- a/src/core/linux/SDL_evdev_kbd_default_keymap.h	Mon Jan 09 11:30:29 2017 -0800
     1.2 +++ b/src/core/linux/SDL_evdev_kbd_default_keymap.h	Mon Jan 09 11:58:01 2017 -0800
     1.3 @@ -155,6 +155,7 @@
     1.4      0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 
     1.5      0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 
     1.6  };
     1.7 +#ifdef INCLUDE_EXTENDED_KEYMAP
     1.8  static unsigned short default_key_map_4[NR_KEYS] = {
     1.9      0xf200, 0xf01b, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf01e, 
    1.10      0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf009, 
    1.11 @@ -4371,12 +4372,14 @@
    1.12      0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 
    1.13      0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 
    1.14  };
    1.15 +#endif /* INCLUDE_EXTENDED_KEYMAP */
    1.16  
    1.17  static unsigned short *default_key_maps[MAX_NR_KEYMAPS] = {
    1.18      default_key_map_0,
    1.19      default_key_map_1,
    1.20      default_key_map_2,
    1.21      default_key_map_3,
    1.22 +#ifdef INCLUDE_EXTENDED_KEYMAP
    1.23      default_key_map_4,
    1.24      default_key_map_5,
    1.25      default_key_map_6,
    1.26 @@ -4501,6 +4504,132 @@
    1.27      default_key_map_125,
    1.28      default_key_map_126,
    1.29      default_key_map_127,
    1.30 +#else /* !INCLUDE_EXTENDED_KEYMAP */
    1.31 +    NULL,
    1.32 +    NULL,
    1.33 +    NULL,
    1.34 +    NULL,
    1.35 +    NULL,
    1.36 +    NULL,
    1.37 +    NULL,
    1.38 +    NULL,
    1.39 +    NULL,
    1.40 +    NULL,
    1.41 +    NULL,
    1.42 +    NULL,
    1.43 +    NULL,
    1.44 +    NULL,
    1.45 +    NULL,
    1.46 +    NULL,
    1.47 +    NULL,
    1.48 +    NULL,
    1.49 +    NULL,
    1.50 +    NULL,
    1.51 +    NULL,
    1.52 +    NULL,
    1.53 +    NULL,
    1.54 +    NULL,
    1.55 +    NULL,
    1.56 +    NULL,
    1.57 +    NULL,
    1.58 +    NULL,
    1.59 +    NULL,
    1.60 +    NULL,
    1.61 +    NULL,
    1.62 +    NULL,
    1.63 +    NULL,
    1.64 +    NULL,
    1.65 +    NULL,
    1.66 +    NULL,
    1.67 +    NULL,
    1.68 +    NULL,
    1.69 +    NULL,
    1.70 +    NULL,
    1.71 +    NULL,
    1.72 +    NULL,
    1.73 +    NULL,
    1.74 +    NULL,
    1.75 +    NULL,
    1.76 +    NULL,
    1.77 +    NULL,
    1.78 +    NULL,
    1.79 +    NULL,
    1.80 +    NULL,
    1.81 +    NULL,
    1.82 +    NULL,
    1.83 +    NULL,
    1.84 +    NULL,
    1.85 +    NULL,
    1.86 +    NULL,
    1.87 +    NULL,
    1.88 +    NULL,
    1.89 +    NULL,
    1.90 +    NULL,
    1.91 +    NULL,
    1.92 +    NULL,
    1.93 +    NULL,
    1.94 +    NULL,
    1.95 +    NULL,
    1.96 +    NULL,
    1.97 +    NULL,
    1.98 +    NULL,
    1.99 +    NULL,
   1.100 +    NULL,
   1.101 +    NULL,
   1.102 +    NULL,
   1.103 +    NULL,
   1.104 +    NULL,
   1.105 +    NULL,
   1.106 +    NULL,
   1.107 +    NULL,
   1.108 +    NULL,
   1.109 +    NULL,
   1.110 +    NULL,
   1.111 +    NULL,
   1.112 +    NULL,
   1.113 +    NULL,
   1.114 +    NULL,
   1.115 +    NULL,
   1.116 +    NULL,
   1.117 +    NULL,
   1.118 +    NULL,
   1.119 +    NULL,
   1.120 +    NULL,
   1.121 +    NULL,
   1.122 +    NULL,
   1.123 +    NULL,
   1.124 +    NULL,
   1.125 +    NULL,
   1.126 +    NULL,
   1.127 +    NULL,
   1.128 +    NULL,
   1.129 +    NULL,
   1.130 +    NULL,
   1.131 +    NULL,
   1.132 +    NULL,
   1.133 +    NULL,
   1.134 +    NULL,
   1.135 +    NULL,
   1.136 +    NULL,
   1.137 +    NULL,
   1.138 +    NULL,
   1.139 +    NULL,
   1.140 +    NULL,
   1.141 +    NULL,
   1.142 +    NULL,
   1.143 +    NULL,
   1.144 +    NULL,
   1.145 +    NULL,
   1.146 +    NULL,
   1.147 +    NULL,
   1.148 +    NULL,
   1.149 +    NULL,
   1.150 +    NULL,
   1.151 +    NULL,
   1.152 +    NULL,
   1.153 +    NULL,
   1.154 +    NULL,
   1.155 +#endif /* INCLUDE_EXTENDED_KEYMAP */
   1.156      NULL,
   1.157      NULL,
   1.158      NULL,