src/events/scancodes_xfree86.h
changeset 2305 fbe8ff44c519
child 2825 620a91b6d263
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/events/scancodes_xfree86.h	Thu Feb 07 15:31:09 2008 +0000
     1.3 @@ -0,0 +1,178 @@
     1.4 +/*
     1.5 +    SDL - Simple DirectMedia Layer
     1.6 +    Copyright (C) 1997-2006 Sam Lantinga
     1.7 +
     1.8 +    This library is free software; you can redistribute it and/or
     1.9 +    modify it under the terms of the GNU Lesser General Public
    1.10 +    License as published by the Free Software Foundation; either
    1.11 +    version 2.1 of the License, or (at your option) any later version.
    1.12 +
    1.13 +    This library is distributed in the hope that it will be useful,
    1.14 +    but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.15 +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.16 +    Lesser General Public License for more details.
    1.17 +
    1.18 +    You should have received a copy of the GNU Lesser General Public
    1.19 +    License along with this library; if not, write to the Free Software
    1.20 +    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    1.21 +
    1.22 +    Sam Lantinga
    1.23 +    slouken@libsdl.org
    1.24 +*/
    1.25 +#include "../../include/SDL_scancode.h"
    1.26 +
    1.27 +/* XFree86 key code to SDL scancode mapping table
    1.28 +   Sources:
    1.29 +   - atKeyNames.h from XFree86 source code
    1.30 +*/
    1.31 +/* *INDENT-OFF* */
    1.32 +static SDL_scancode xfree86_scancode_table[] = {
    1.33 +    /*  0 */    SDL_SCANCODE_UNKNOWN,
    1.34 +    /*  1 */    SDL_SCANCODE_ESCAPE,
    1.35 +    /*  2 */    SDL_SCANCODE_1,
    1.36 +    /*  3 */    SDL_SCANCODE_2,
    1.37 +    /*  4 */    SDL_SCANCODE_3,
    1.38 +    /*  5 */    SDL_SCANCODE_4,
    1.39 +    /*  6 */    SDL_SCANCODE_5,
    1.40 +    /*  7 */    SDL_SCANCODE_6,
    1.41 +    /*  8 */    SDL_SCANCODE_7,
    1.42 +    /*  9 */    SDL_SCANCODE_8,
    1.43 +    /*  10 */   SDL_SCANCODE_9,
    1.44 +    /*  11 */   SDL_SCANCODE_0,
    1.45 +    /*  12 */   SDL_SCANCODE_MINUS,
    1.46 +    /*  13 */   SDL_SCANCODE_EQUALS,
    1.47 +    /*  14 */   SDL_SCANCODE_BACKSPACE,
    1.48 +    /*  15 */   SDL_SCANCODE_TAB,
    1.49 +    /*  16 */   SDL_SCANCODE_Q,
    1.50 +    /*  17 */   SDL_SCANCODE_W,
    1.51 +    /*  18 */   SDL_SCANCODE_E,
    1.52 +    /*  19 */   SDL_SCANCODE_R,
    1.53 +    /*  20 */   SDL_SCANCODE_T,
    1.54 +    /*  21 */   SDL_SCANCODE_Y,
    1.55 +    /*  22 */   SDL_SCANCODE_U,
    1.56 +    /*  23 */   SDL_SCANCODE_I,
    1.57 +    /*  24 */   SDL_SCANCODE_O,
    1.58 +    /*  25 */   SDL_SCANCODE_P,
    1.59 +    /*  26 */   SDL_SCANCODE_LEFTBRACKET,
    1.60 +    /*  27 */   SDL_SCANCODE_RIGHTBRACKET,
    1.61 +    /*  28 */   SDL_SCANCODE_RETURN,
    1.62 +    /*  29 */   SDL_SCANCODE_LCTRL,
    1.63 +    /*  30 */   SDL_SCANCODE_A,
    1.64 +    /*  31 */   SDL_SCANCODE_S,
    1.65 +    /*  32 */   SDL_SCANCODE_D,
    1.66 +    /*  33 */   SDL_SCANCODE_F,
    1.67 +    /*  34 */   SDL_SCANCODE_G,
    1.68 +    /*  35 */   SDL_SCANCODE_H,
    1.69 +    /*  36 */   SDL_SCANCODE_J,
    1.70 +    /*  37 */   SDL_SCANCODE_K,
    1.71 +    /*  38 */   SDL_SCANCODE_L,
    1.72 +    /*  39 */   SDL_SCANCODE_SEMICOLON,
    1.73 +    /*  40 */   SDL_SCANCODE_APOSTROPHE,
    1.74 +    /*  41 */   SDL_SCANCODE_GRAVE,
    1.75 +    /*  42 */   SDL_SCANCODE_LSHIFT,
    1.76 +    /*  43 */   SDL_SCANCODE_BACKSLASH,
    1.77 +    /*  44 */   SDL_SCANCODE_Z,
    1.78 +    /*  45 */   SDL_SCANCODE_X,
    1.79 +    /*  46 */   SDL_SCANCODE_C,
    1.80 +    /*  47 */   SDL_SCANCODE_V,
    1.81 +    /*  48 */   SDL_SCANCODE_B,
    1.82 +    /*  49 */   SDL_SCANCODE_N,
    1.83 +    /*  50 */   SDL_SCANCODE_M,
    1.84 +    /*  51 */   SDL_SCANCODE_COMMA,
    1.85 +    /*  52 */   SDL_SCANCODE_PERIOD,
    1.86 +    /*  53 */   SDL_SCANCODE_SLASH,
    1.87 +    /*  54 */   SDL_SCANCODE_RSHIFT,
    1.88 +    /*  55 */   SDL_SCANCODE_KP_MULTIPLY,
    1.89 +    /*  56 */   SDL_SCANCODE_LALT,
    1.90 +    /*  57 */   SDL_SCANCODE_SPACE,
    1.91 +    /*  58 */   SDL_SCANCODE_CAPSLOCK,
    1.92 +    /*  59 */   SDL_SCANCODE_F1,
    1.93 +    /*  60 */   SDL_SCANCODE_F2,
    1.94 +    /*  61 */   SDL_SCANCODE_F3,
    1.95 +    /*  62 */   SDL_SCANCODE_F4,
    1.96 +    /*  63 */   SDL_SCANCODE_F5,
    1.97 +    /*  64 */   SDL_SCANCODE_F6,
    1.98 +    /*  65 */   SDL_SCANCODE_F7,
    1.99 +    /*  66 */   SDL_SCANCODE_F8,
   1.100 +    /*  67 */   SDL_SCANCODE_F9,
   1.101 +    /*  68 */   SDL_SCANCODE_F10,
   1.102 +    /*  69 */   SDL_SCANCODE_NUMLOCKCLEAR,
   1.103 +    /*  70 */   SDL_SCANCODE_SCROLLLOCK,
   1.104 +    /*  71 */   SDL_SCANCODE_KP_7,
   1.105 +    /*  72 */   SDL_SCANCODE_KP_8,
   1.106 +    /*  73 */   SDL_SCANCODE_KP_9,
   1.107 +    /*  74 */   SDL_SCANCODE_KP_MINUS,
   1.108 +    /*  75 */   SDL_SCANCODE_KP_4,
   1.109 +    /*  76 */   SDL_SCANCODE_KP_5,
   1.110 +    /*  77 */   SDL_SCANCODE_KP_6,
   1.111 +    /*  78 */   SDL_SCANCODE_KP_PLUS,
   1.112 +    /*  79 */   SDL_SCANCODE_KP_1,
   1.113 +    /*  80 */   SDL_SCANCODE_KP_2,
   1.114 +    /*  81 */   SDL_SCANCODE_KP_3,
   1.115 +    /*  82 */   SDL_SCANCODE_KP_0,
   1.116 +    /*  83 */   SDL_SCANCODE_KP_PERIOD,
   1.117 +    /*  84 */   SDL_SCANCODE_SYSREQ,
   1.118 +    /*  85 */   SDL_SCANCODE_MODE,
   1.119 +    /*  86 */   SDL_SCANCODE_NONUSBACKSLASH,
   1.120 +    /*  87 */   SDL_SCANCODE_F11,
   1.121 +    /*  88 */   SDL_SCANCODE_F12,
   1.122 +    /*  89 */   SDL_SCANCODE_HOME,
   1.123 +    /*  90 */   SDL_SCANCODE_UP,
   1.124 +    /*  91 */   SDL_SCANCODE_PAGEUP,
   1.125 +    /*  92 */   SDL_SCANCODE_LEFT,
   1.126 +    /*  93 */   SDL_SCANCODE_BRIGHTNESSDOWN, /* on PowerBook G4 / KEY_Begin */
   1.127 +    /*  94 */   SDL_SCANCODE_RIGHT,
   1.128 +    /*  95 */   SDL_SCANCODE_END,
   1.129 +    /*  96 */   SDL_SCANCODE_DOWN,
   1.130 +    /*  97 */   SDL_SCANCODE_PAGEDOWN,
   1.131 +    /*  98 */   SDL_SCANCODE_INSERT,
   1.132 +    /*  99 */   SDL_SCANCODE_DELETE,
   1.133 +    /*  100 */  SDL_SCANCODE_KP_ENTER,
   1.134 +    /*  101 */  SDL_SCANCODE_RCTRL,
   1.135 +    /*  102 */  SDL_SCANCODE_PAUSE,
   1.136 +    /*  103 */  SDL_SCANCODE_PRINTSCREEN,
   1.137 +    /*  104 */  SDL_SCANCODE_KP_DIVIDE,
   1.138 +    /*  105 */  SDL_SCANCODE_RALT,
   1.139 +    /*  106 */  SDL_SCANCODE_UNKNOWN, /* BREAK */
   1.140 +    /*  107 */  SDL_SCANCODE_LGUI,
   1.141 +    /*  108 */  SDL_SCANCODE_RGUI,
   1.142 +    /*  109 */  SDL_SCANCODE_APPLICATION,
   1.143 +    /*  110 */  SDL_SCANCODE_F13,
   1.144 +    /*  111 */  SDL_SCANCODE_F14,
   1.145 +    /*  112 */  SDL_SCANCODE_F15,
   1.146 +    /*  113 */  SDL_SCANCODE_F16,
   1.147 +    /*  114 */  SDL_SCANCODE_F17,
   1.148 +    /*  115 */	SDL_SCANCODE_UNKNOWN,
   1.149 +    /*	116 */  SDL_SCANCODE_UNKNOWN, /* is translated to XK_ISO_Level3_Shift by my X server, but I have no keyboard that generates this code, so I don't know what the correct SDL_SCANCODE_* for it is */
   1.150 +    /*  117 */  SDL_SCANCODE_UNKNOWN,
   1.151 +    /*  118 */  SDL_SCANCODE_KP_EQUALS,
   1.152 +    /*  119 */  SDL_SCANCODE_UNKNOWN,
   1.153 +    /*  120 */  SDL_SCANCODE_UNKNOWN,
   1.154 +    /*  121 */  SDL_SCANCODE_UNKNOWN,
   1.155 +    /*  122 */  SDL_SCANCODE_UNKNOWN,
   1.156 +    /*  123 */  SDL_SCANCODE_UNKNOWN,
   1.157 +    /*  124 */  SDL_SCANCODE_UNKNOWN,
   1.158 +    /*  125 */  SDL_SCANCODE_INTERNATIONAL3, /* Yen */
   1.159 +    /*  126 */  SDL_SCANCODE_UNKNOWN,
   1.160 +    /*  127 */  SDL_SCANCODE_UNKNOWN,
   1.161 +    /*  128 */  SDL_SCANCODE_UNKNOWN,
   1.162 +    /*  129 */  SDL_SCANCODE_UNKNOWN,
   1.163 +    /*  130 */  SDL_SCANCODE_UNKNOWN,
   1.164 +    /*  131 */  SDL_SCANCODE_UNKNOWN,
   1.165 +    /*  132 */  SDL_SCANCODE_POWER,
   1.166 +    /*  133 */  SDL_SCANCODE_MUTE,
   1.167 +    /*  134 */  SDL_SCANCODE_VOLUMEDOWN,
   1.168 +    /*  135 */  SDL_SCANCODE_VOLUMEUP,
   1.169 +    /*  136 */  SDL_SCANCODE_HELP,
   1.170 +    /*  137 */  SDL_SCANCODE_STOP,
   1.171 +    /*  138 */  SDL_SCANCODE_AGAIN,
   1.172 +    /*  139 */  SDL_SCANCODE_UNKNOWN, /* PROPS */
   1.173 +    /*  140 */  SDL_SCANCODE_UNDO,
   1.174 +    /*  141 */  SDL_SCANCODE_UNKNOWN, /* FRONT */
   1.175 +    /*  142 */  SDL_SCANCODE_COPY,
   1.176 +    /*  143 */  SDL_SCANCODE_UNKNOWN, /* OPEN */
   1.177 +    /*  144 */  SDL_SCANCODE_PASTE,
   1.178 +    /*  145 */  SDL_SCANCODE_FIND,
   1.179 +    /*  146 */  SDL_SCANCODE_CUT,
   1.180 +};
   1.181 +/* *INDENT-ON* */