annotate src/video/x11/SDL_x11keyboard.c @ 2296:0869721b488f

Fixed some typos in SDL_x11keyboard.c
author Bob Pendleton <bob@pendleton.com>
date Wed, 09 Jan 2008 23:40:56 +0000
parents dbc6d1893869
children 9f712d1e77f2
rev   line source
1950
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13 Lesser General Public License for more details.
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21 */
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 #include "SDL_config.h"
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 #include "SDL_x11video.h"
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
25
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 #include "../../events/SDL_keyboard_c.h"
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
28 #include <X11/keysym.h>
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
29
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
30 #include "imKStoUCS.h"
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
31
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
32 /*
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
33 KeyCode-to-SDLKey translation tables for various X servers. Which
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
34 one to use is decided in X11_InitKeyboard().
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
35 */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
36
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
37 static SDLKey macKeyCodeToSDLK[];
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
38 static SDLKey xorgLinuxKeyCodeToSDLK[];
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
39
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
40 static SDLKey *keyCodeToSDLKeyTables[] = {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
41 xorgLinuxKeyCodeToSDLK,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
42 macKeyCodeToSDLK,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
43 NULL
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
44 };
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
45
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
46 /* *INDENT-OFF* */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
47
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
48 /* These are just Mac virtual key codes + 8 (see SDL/src/video/cocoa/
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
49 SDL_cocoakeys.h for more info). Observed to work with Apple X11 on
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
50 Mac OS X 10.4. May also work on older Linux distributions on Mac
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
51 hardware.
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
52 */
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
53
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
54 #define KeyCodeTableSize (258)
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
55 static SDLKey macKeyCodeToSDLK[KeyCodeTableSize] =
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
56 {
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
57 /* 0 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
58 /* 1 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
59 /* 2 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
60 /* 3 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
61 /* 4 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
62 /* 5 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
63 /* 6 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
64 /* 7 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
65 /* 8 */ SDLK_A,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
66 /* 9 */ SDLK_S,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
67 /* 10 */ SDLK_D,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
68 /* 11 */ SDLK_F,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
69 /* 12 */ SDLK_H,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
70 /* 13 */ SDLK_G,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
71 /* 14 */ SDLK_Z,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
72 /* 15 */ SDLK_X,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
73 /* 16 */ SDLK_C,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
74 /* 17 */ SDLK_V,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
75 /* 18 */ SDLK_GRAVE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
76 /* 19 */ SDLK_B,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
77 /* 20 */ SDLK_Q,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
78 /* 21 */ SDLK_W,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
79 /* 22 */ SDLK_E,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
80 /* 23 */ SDLK_R,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
81 /* 24 */ SDLK_Y,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
82 /* 25 */ SDLK_T,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
83 /* 26 */ SDLK_1,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
84 /* 27 */ SDLK_2,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
85 /* 28 */ SDLK_3,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
86 /* 29 */ SDLK_4,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
87 /* 30 */ SDLK_6,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
88 /* 31 */ SDLK_5,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
89 /* 32 */ SDLK_EQUALS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
90 /* 33 */ SDLK_9,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
91 /* 34 */ SDLK_7,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
92 /* 35 */ SDLK_HYPHENMINUS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
93 /* 36 */ SDLK_8,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
94 /* 37 */ SDLK_0,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
95 /* 38 */ SDLK_RIGHTBRACKET,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
96 /* 39 */ SDLK_O,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
97 /* 40 */ SDLK_U,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
98 /* 41 */ SDLK_LEFTBRACKET,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
99 /* 42 */ SDLK_I,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
100 /* 43 */ SDLK_P,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
101 /* 44 */ SDLK_RETURN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
102 /* 45 */ SDLK_L,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
103 /* 46 */ SDLK_J,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
104 /* 47 */ SDLK_APOSTROPHE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
105 /* 48 */ SDLK_K,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
106 /* 49 */ SDLK_SEMICOLON,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
107 /* 50 */ SDLK_BACKSLASH,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
108 /* 51 */ SDLK_COMMA,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
109 /* 52 */ SDLK_SLASH,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
110 /* 53 */ SDLK_N,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
111 /* 54 */ SDLK_M,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
112 /* 55 */ SDLK_PERIOD,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
113 /* 56 */ SDLK_TAB,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
114 /* 57 */ SDLK_SPACE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
115 /* 58 */ SDLK_NONUSBACKSLASH,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
116 /* 59 */ SDLK_BACKSPACE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
117 /* 60 */ SDLK_KP_ENTER,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
118 /* 61 */ SDLK_ESCAPE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
119 /* 62 */ SDLK_RMETA,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
120 /* 63 */ SDLK_LMETA,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
121 /* 64 */ SDLK_LSHIFT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
122 /* 65 */ SDLK_CAPSLOCK,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
123 /* 66 */ SDLK_LALT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
124 /* 67 */ SDLK_LCTRL,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
125 /* 68 */ SDLK_RSHIFT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
126 /* 69 */ SDLK_RALT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
127 /* 70 */ SDLK_RCTRL,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
128 /* 71 */ SDLK_NONE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
129 /* 72 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
130 /* 73 */ SDLK_KP_PERIOD,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
131 /* 74 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
132 /* 75 */ SDLK_KP_MULTIPLY,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
133 /* 76 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
134 /* 77 */ SDLK_KP_PLUS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
135 /* 78 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
136 /* 79 */ SDLK_KP_NUMLOCKCLEAR,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
137 /* 80 */ SDLK_VOLUMEUP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
138 /* 81 */ SDLK_VOLUMEDOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
139 /* 82 */ SDLK_MUTE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
140 /* 83 */ SDLK_KP_DIVIDE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
141 /* 84 */ SDLK_KP_ENTER,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
142 /* 85 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
143 /* 86 */ SDLK_KP_MINUS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
144 /* 87 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
145 /* 88 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
146 /* 89 */ SDLK_KP_EQUALS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
147 /* 90 */ SDLK_KP_0,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
148 /* 91 */ SDLK_KP_1,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
149 /* 92 */ SDLK_KP_2,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
150 /* 93 */ SDLK_KP_3,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
151 /* 94 */ SDLK_KP_4,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
152 /* 95 */ SDLK_KP_5,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
153 /* 96 */ SDLK_KP_6,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
154 /* 97 */ SDLK_KP_7,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
155 /* 98 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
156 /* 99 */ SDLK_KP_8,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
157 /* 100 */ SDLK_KP_9,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
158 /* 101 */ SDLK_INTERNATIONAL3,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
159 /* 102 */ SDLK_INTERNATIONAL1,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
160 /* 103 */ SDLK_KP_COMMA,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
161 /* 104 */ SDLK_F5,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
162 /* 105 */ SDLK_F6,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
163 /* 106 */ SDLK_F7,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
164 /* 107 */ SDLK_F3,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
165 /* 108 */ SDLK_F8,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
166 /* 109 */ SDLK_F9,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
167 /* 110 */ SDLK_LANG2,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
168 /* 111 */ SDLK_F11,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
169 /* 112 */ SDLK_LANG1,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
170 /* 113 */ SDLK_PRINTSCREEN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
171 /* 114 */ SDLK_F16,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
172 /* 115 */ SDLK_SCROLLLOCK,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
173 /* 116 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
174 /* 117 */ SDLK_F10,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
175 /* 118 */ SDLK_APPLICATION,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
176 /* 119 */ SDLK_F12,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
177 /* 120 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
178 /* 121 */ SDLK_PAUSE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
179 /* 122 */ SDLK_INSERT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
180 /* 123 */ SDLK_HOME,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
181 /* 124 */ SDLK_PAGEUP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
182 /* 125 */ SDLK_DELETE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
183 /* 126 */ SDLK_F4,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
184 /* 127 */ SDLK_END,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
185 /* 128 */ SDLK_F2,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
186 /* 129 */ SDLK_PAGEDOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
187 /* 130 */ SDLK_F1,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
188 /* 131 */ SDLK_LEFT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
189 /* 132 */ SDLK_RIGHT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
190 /* 133 */ SDLK_DOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
191 /* 134 */ SDLK_UP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
192 /* 135 */ SDLK_POWER,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
193 /* 136 */ SDLK_UNKNOWN, /* codes higher than 135 shouldn't occur as Mac virtual keycodes only go to 127 */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
194 /* 137 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
195 /* 138 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
196 /* 139 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
197 /* 140 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
198 /* 141 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
199 /* 142 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
200 /* 143 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
201 /* 144 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
202 /* 145 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
203 /* 146 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
204 /* 147 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
205 /* 148 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
206 /* 149 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
207 /* 150 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
208 /* 151 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
209 /* 152 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
210 /* 153 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
211 /* 154 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
212 /* 155 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
213 /* 156 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
214 /* 157 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
215 /* 158 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
216 /* 159 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
217 /* 160 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
218 /* 161 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
219 /* 162 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
220 /* 163 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
221 /* 164 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
222 /* 165 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
223 /* 166 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
224 /* 167 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
225 /* 168 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
226 /* 169 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
227 /* 170 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
228 /* 171 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
229 /* 172 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
230 /* 173 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
231 /* 174 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
232 /* 175 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
233 /* 176 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
234 /* 177 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
235 /* 178 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
236 /* 179 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
237 /* 180 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
238 /* 181 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
239 /* 182 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
240 /* 183 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
241 /* 184 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
242 /* 185 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
243 /* 186 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
244 /* 187 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
245 /* 188 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
246 /* 189 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
247 /* 190 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
248 /* 191 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
249 /* 192 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
250 /* 193 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
251 /* 194 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
252 /* 195 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
253 /* 196 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
254 /* 197 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
255 /* 198 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
256 /* 199 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
257 /* 200 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
258 /* 201 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
259 /* 202 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
260 /* 203 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
261 /* 204 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
262 /* 205 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
263 /* 206 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
264 /* 207 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
265 /* 208 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
266 /* 209 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
267 /* 210 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
268 /* 211 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
269 /* 212 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
270 /* 213 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
271 /* 214 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
272 /* 215 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
273 /* 216 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
274 /* 217 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
275 /* 218 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
276 /* 219 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
277 /* 220 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
278 /* 221 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
279 /* 222 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
280 /* 223 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
281 /* 224 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
282 /* 225 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
283 /* 226 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
284 /* 227 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
285 /* 228 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
286 /* 229 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
287 /* 230 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
288 /* 231 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
289 /* 232 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
290 /* 233 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
291 /* 234 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
292 /* 235 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
293 /* 236 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
294 /* 237 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
295 /* 238 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
296 /* 239 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
297 /* 240 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
298 /* 241 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
299 /* 242 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
300 /* 243 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
301 /* 244 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
302 /* 245 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
303 /* 246 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
304 /* 247 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
305 /* 248 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
306 /* 249 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
307 /* 250 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
308 /* 251 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
309 /* 252 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
310 /* 253 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
311 /* 254 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
312 /* 255 */ SDLK_UNKNOWN
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
313 };
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
314
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
315 /* Found mostly by experimentation with X.org on Linux (Fedora Core 4 and
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
316 Ubuntu Dapper) on PC and PPC Mac hardware, some parts (especially about
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
317 the "multimedia"/"internet" keys) from various sources on the web.
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
318 */
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
319 static SDLKey xorgLinuxKeyCodeToSDLK[KeyCodeTableSize] =
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
320 {
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
321 /* 0 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
322 /* 1 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
323 /* 2 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
324 /* 3 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
325 /* 4 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
326 /* 5 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
327 /* 6 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
328 /* 7 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
329 /* 8 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
330 /* 9 */ SDLK_ESCAPE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
331 /* 10 */ SDLK_1,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
332 /* 11 */ SDLK_2,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
333 /* 12 */ SDLK_3,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
334 /* 13 */ SDLK_4,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
335 /* 14 */ SDLK_5,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
336 /* 15 */ SDLK_6,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
337 /* 16 */ SDLK_7,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
338 /* 17 */ SDLK_8,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
339 /* 18 */ SDLK_9,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
340 /* 19 */ SDLK_0,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
341 /* 20 */ SDLK_HYPHENMINUS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
342 /* 21 */ SDLK_EQUALS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
343 /* 22 */ SDLK_BACKSPACE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
344 /* 23 */ SDLK_TAB,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
345 /* 24 */ SDLK_Q,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
346 /* 25 */ SDLK_W,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
347 /* 26 */ SDLK_E,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
348 /* 27 */ SDLK_R,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
349 /* 28 */ SDLK_T,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
350 /* 29 */ SDLK_Y,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
351 /* 30 */ SDLK_U,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
352 /* 31 */ SDLK_I,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
353 /* 32 */ SDLK_O,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
354 /* 33 */ SDLK_P,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
355 /* 34 */ SDLK_LEFTBRACKET,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
356 /* 35 */ SDLK_RIGHTBRACKET,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
357 /* 36 */ SDLK_RETURN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
358 /* 37 */ SDLK_LCTRL,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
359 /* 38 */ SDLK_A,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
360 /* 39 */ SDLK_S,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
361 /* 40 */ SDLK_D,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
362 /* 41 */ SDLK_F,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
363 /* 42 */ SDLK_G,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
364 /* 43 */ SDLK_H,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
365 /* 44 */ SDLK_J,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
366 /* 45 */ SDLK_K,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
367 /* 46 */ SDLK_L,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
368 /* 47 */ SDLK_SEMICOLON,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
369 /* 48 */ SDLK_APOSTROPHE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
370 /* 49 */ SDLK_GRAVE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
371 /* 50 */ SDLK_LSHIFT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
372 /* 51 */ SDLK_BACKSLASH,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
373 /* 52 */ SDLK_Z,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
374 /* 53 */ SDLK_X,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
375 /* 54 */ SDLK_C,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
376 /* 55 */ SDLK_V,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
377 /* 56 */ SDLK_B,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
378 /* 57 */ SDLK_N,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
379 /* 58 */ SDLK_M,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
380 /* 59 */ SDLK_COMMA,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
381 /* 60 */ SDLK_PERIOD,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
382 /* 61 */ SDLK_SLASH,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
383 /* 62 */ SDLK_RSHIFT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
384 /* 63 */ SDLK_KP_MULTIPLY,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
385 /* 64 */ SDLK_LALT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
386 /* 65 */ SDLK_SPACE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
387 /* 66 */ SDLK_CAPSLOCK,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
388 /* 67 */ SDLK_F1,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
389 /* 68 */ SDLK_F2,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
390 /* 69 */ SDLK_F3,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
391 /* 70 */ SDLK_F4,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
392 /* 71 */ SDLK_F5,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
393 /* 72 */ SDLK_F6,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
394 /* 73 */ SDLK_F7,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
395 /* 74 */ SDLK_F8,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
396 /* 75 */ SDLK_F9,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
397 /* 76 */ SDLK_F10,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
398 /* 77 */ SDLK_KP_NUMLOCKCLEAR,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
399 /* 78 */ SDLK_SCROLLLOCK,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
400 /* 79 */ SDLK_KP_7,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
401 /* 80 */ SDLK_KP_8,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
402 /* 81 */ SDLK_KP_9,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
403 /* 82 */ SDLK_KP_MINUS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
404 /* 83 */ SDLK_KP_4,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
405 /* 84 */ SDLK_KP_5,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
406 /* 85 */ SDLK_KP_6,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
407 /* 86 */ SDLK_KP_PLUS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
408 /* 87 */ SDLK_KP_1,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
409 /* 88 */ SDLK_KP_2,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
410 /* 89 */ SDLK_KP_3,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
411 /* 90 */ SDLK_KP_0,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
412 /* 91 */ SDLK_KP_PERIOD,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
413 /* 92 */ SDLK_SYSREQ,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
414 /* 93 */ SDLK_MODE, /* is translated to XK_Mode_switch by my X server, but I have no keyboard that generates this code, so I'm not sure if this is correct */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
415 /* 94 */ SDLK_NONUSBACKSLASH,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
416 /* 95 */ SDLK_F11,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
417 /* 96 */ SDLK_F12,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
418 /* 97 */ SDLK_HOME,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
419 /* 98 */ SDLK_UP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
420 /* 99 */ SDLK_PAGEUP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
421 /* 100 */ SDLK_LEFT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
422 /* 101 */ SDLK_BRIGHTNESSDOWN, /* on PowerBook G4 */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
423 /* 102 */ SDLK_RIGHT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
424 /* 103 */ SDLK_END,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
425 /* 104 */ SDLK_DOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
426 /* 105 */ SDLK_PAGEDOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
427 /* 106 */ SDLK_INSERT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
428 /* 107 */ SDLK_DELETE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
429 /* 108 */ SDLK_KP_ENTER,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
430 /* 109 */ SDLK_RCTRL,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
431 /* 110 */ SDLK_PAUSE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
432 /* 111 */ SDLK_PRINTSCREEN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
433 /* 112 */ SDLK_KP_DIVIDE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
434 /* 113 */ SDLK_RALT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
435 /* 114 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
436 /* 115 */ SDLK_LMETA,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
437 /* 116 */ SDLK_RMETA,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
438 /* 117 */ SDLK_APPLICATION,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
439 /* 118 */ SDLK_F13,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
440 /* 119 */ SDLK_F14,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
441 /* 120 */ SDLK_F15,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
442 /* 121 */ SDLK_F16,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
443 /* 122 */ SDLK_F17,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
444 /* 123 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
445 /* 124 */ SDLK_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 SDLK_* for it is */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
446 /* 125 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
447 /* 126 */ SDLK_KP_EQUALS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
448 /* 127 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
449 /* 128 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
450 /* 129 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
451 /* 130 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
452 /* 131 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
453 /* 132 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
454 /* 133 */ SDLK_INTERNATIONAL3, /* Yen */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
455 /* 134 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
456 /* 135 */ SDLK_AGAIN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
457 /* 136 */ SDLK_UNDO,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
458 /* 137 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
459 /* 138 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
460 /* 139 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
461 /* 140 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
462 /* 141 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
463 /* 142 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
464 /* 143 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
465 /* 144 */ SDLK_AUDIOPREV,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
466 /* 145 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
467 /* 146 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
468 /* 147 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
469 /* 148 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
470 /* 149 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
471 /* 150 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
472 /* 151 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
473 /* 152 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
474 /* 153 */ SDLK_AUDIONEXT,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
475 /* 154 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
476 /* 155 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
477 /* 156 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
478 /* 157 */ SDLK_KP_EQUALS, /* on PowerBook G4 */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
479 /* 158 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
480 /* 159 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
481 /* 160 */ SDLK_MUTE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
482 /* 161 */ SDLK_CALC,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
483 /* 162 */ SDLK_AUDIOPLAY,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
484 /* 163 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
485 /* 164 */ SDLK_AUDIOSTOP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
486 /* 165 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
487 /* 166 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
488 /* 167 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
489 /* 168 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
490 /* 169 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
491 /* 170 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
492 /* 171 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
493 /* 172 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
494 /* 173 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
495 /* 174 */ SDLK_VOLUMEDOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
496 /* 175 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
497 /* 176 */ SDLK_VOLUMEUP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
498 /* 177 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
499 /* 178 */ SDLK_WWW,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
500 /* 179 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
501 /* 180 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
502 /* 181 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
503 /* 182 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
504 /* 183 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
505 /* 184 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
506 /* 185 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
507 /* 186 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
508 /* 187 */ SDLK_HELP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
509 /* 188 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
510 /* 189 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
511 /* 190 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
512 /* 191 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
513 /* 192 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
514 /* 193 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
515 /* 194 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
516 /* 195 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
517 /* 196 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
518 /* 197 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
519 /* 198 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
520 /* 199 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
521 /* 200 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
522 /* 201 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
523 /* 202 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
524 /* 203 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
525 /* 204 */ SDLK_EJECT, /* on PowerBook G4 */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
526 /* 205 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
527 /* 206 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
528 /* 207 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
529 /* 208 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
530 /* 209 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
531 /* 210 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
532 /* 211 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
533 /* 212 */ SDLK_BRIGHTNESSUP, /* on PowerBook G4 */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
534 /* 213 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
535 /* 214 */ SDLK_DISPLAYSWITCH, /* on PowerBook G4 */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
536 /* 215 */ SDLK_KBDILLUMTOGGLE,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
537 /* 216 */ SDLK_KBDILLUMDOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
538 /* 217 */ SDLK_KBDILLUMUP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
539 /* 218 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
540 /* 219 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
541 /* 220 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
542 /* 221 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
543 /* 222 */ SDLK_POWER,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
544 /* 223 */ SDLK_SLEEP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
545 /* 224 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
546 /* 225 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
547 /* 226 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
548 /* 227 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
549 /* 228 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
550 /* 229 */ SDLK_SEARCH,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
551 /* 230 */ SDLK_BOOKMARKS,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
552 /* 231 */ SDLK_BROWSERRELOAD,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
553 /* 232 */ SDLK_BROWSERSTOP,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
554 /* 233 */ SDLK_BROWSERFORWARD,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
555 /* 234 */ SDLK_BROWSERBACK,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
556 /* 235 */ SDLK_COMPUTER,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
557 /* 236 */ SDLK_EMAIL,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
558 /* 237 */ SDLK_MEDIA,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
559 /* 238 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
560 /* 239 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
561 /* 240 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
562 /* 241 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
563 /* 242 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
564 /* 243 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
565 /* 244 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
566 /* 245 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
567 /* 246 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
568 /* 247 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
569 /* 248 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
570 /* 249 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
571 /* 250 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
572 /* 251 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
573 /* 252 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
574 /* 253 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
575 /* 254 */ SDLK_UNKNOWN,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
576 /* 255 */ SDLK_UNKNOWN
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
577 };
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
578
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
579 /*---------------------------------------------------------------------------*/
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
580
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
581 /* Used by X11_KeySymToSDLKey(). This is a hybrid of a KeySym-to-layout-key
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
582 mapping (needed in X11_GetLayoutKey()) and a fallback KeySym-to-physical-key
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
583 mapping under the assumption of a US keyboard layout (needed in
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
584 X11_InitKeyboard()). If for a given KeySym...
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
585 - the layout and physical codes are the same (must be an SDLK_ constant):
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
586 there is one entry,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
587 - the layout and physical codes differ: there are two entries, with the
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
588 layout one first,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
589 - there is only a physical code in the table (must be an SDLK_ constant):
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
590 it's marked by X11_KEY_PHYSICAL_ONLY_BIT (this is the case when the layout
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
591 key code is handled by KeySymToUcs4()),
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
592 - there is only a layout code in the table (can't be an SDLK_ constant):
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
593 recognizable by the absence of SDL_KEY_CAN_BE_PHYSICAL_BIT.
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
594 This list is sorted by KeySym to allow a binary search.
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
595 */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
596 #define X11_KEY_PHYSICAL_ONLY_BIT SDL_KEY_LAYOUT_SPECIAL_BIT
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
597 /* SDL_KEY_LAYOUT_SPECIAL_BIT cannot possibly occur in an SDLK_ constant, so we may repurpose that bit for our own use. */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
598 static struct
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
599 {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
600 KeySym sym;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
601 SDLKey key;
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
602 } keySymToSDLKey[KeyCodeTableSize] =
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
603 {
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
604 /* 0x00xx */
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
605 {XK_space, SDLK_SPACE},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
606 {XK_apostrophe, SDLK_APOSTROPHE | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
607 {XK_comma, SDLK_COMMA | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
608 {XK_minus, SDLK_HYPHENMINUS | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
609 {XK_period, SDLK_PERIOD | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
610 {XK_slash, SDLK_SLASH | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
611 {XK_0, SDLK_0 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
612 {XK_1, SDLK_1 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
613 {XK_2, SDLK_2 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
614 {XK_3, SDLK_3 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
615 {XK_4, SDLK_4 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
616 {XK_5, SDLK_5 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
617 {XK_6, SDLK_6 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
618 {XK_7, SDLK_7 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
619 {XK_8, SDLK_8 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
620 {XK_9, SDLK_9 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
621 {XK_semicolon, SDLK_SEMICOLON | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
622 {XK_less, SDLK_NONUSBACKSLASH | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
623 {XK_equal, SDLK_EQUALS | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
624 {XK_bracketleft, SDLK_LEFTBRACKET | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
625 {XK_backslash, SDLK_BACKSLASH | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
626 {XK_bracketright, SDLK_RIGHTBRACKET | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
627 {XK_grave, SDLK_GRAVE | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
628 {XK_a, SDLK_A | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
629 {XK_b, SDLK_B | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
630 {XK_c, SDLK_C | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
631 {XK_d, SDLK_D | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
632 {XK_e, SDLK_E | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
633 {XK_f, SDLK_F | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
634 {XK_g, SDLK_G | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
635 {XK_h, SDLK_H | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
636 {XK_i, SDLK_I | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
637 {XK_j, SDLK_J | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
638 {XK_k, SDLK_K | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
639 {XK_l, SDLK_L | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
640 {XK_m, SDLK_M | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
641 {XK_n, SDLK_N | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
642 {XK_o, SDLK_O | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
643 {XK_p, SDLK_P | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
644 {XK_q, SDLK_Q | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
645 {XK_r, SDLK_R | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
646 {XK_s, SDLK_S | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
647 {XK_t, SDLK_T | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
648 {XK_u, SDLK_U | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
649 {XK_v, SDLK_V | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
650 {XK_w, SDLK_W | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
651 {XK_x, SDLK_X | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
652 {XK_y, SDLK_Y | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
653 {XK_z, SDLK_Z | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
654 {XK_section, SDLK_NONUSBACKSLASH | X11_KEY_PHYSICAL_ONLY_BIT},
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
655 /* 0xFExx */
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
656 {XK_ISO_Level3_Shift, SDLK_RALT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
657 {XK_dead_grave, '`'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
658 {XK_dead_acute, 0xB4},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
659 {XK_dead_circumflex, '^'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
660 {XK_dead_tilde, '~'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
661 {XK_dead_macron, 0xAF},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
662 {XK_dead_breve, 0x2D8},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
663 {XK_dead_abovedot, 0x2D9},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
664 {XK_dead_diaeresis, 0xA8},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
665 {XK_dead_abovering, 0x2DA},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
666 {XK_dead_doubleacute, 0x2DD},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
667 {XK_dead_caron, 0x2C7},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
668 {XK_dead_cedilla, 0xB8},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
669 {XK_dead_ogonek, 0x2DB},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
670 {XK_dead_iota, 0x3B9},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
671 {XK_dead_voiced_sound, 0x309B},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
672 {XK_dead_semivoiced_sound, 0x309C},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
673 {XK_dead_belowdot, 0xB7}, /* that's actually MIDDLE DOT,
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
674 but I haven't found a
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
675 non-combining DOT BELOW
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
676 XK_dead_hook, XK_dead_horn: I
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
677 haven't found non-combining
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
678 HOOK and HORN characters */
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
679 /* 0xFFxx */
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
680 {XK_BackSpace, SDLK_BACKSPACE},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
681 {XK_Tab, SDLK_TAB},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
682 {XK_Return, SDLK_RETURN},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
683 {XK_Pause, SDLK_PAUSE},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
684 {XK_Scroll_Lock, SDLK_SCROLLLOCK},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
685 {XK_Escape, SDLK_ESCAPE},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
686 {XK_Home, SDLK_HOME},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
687 {XK_Left, SDLK_LEFT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
688 {XK_Up, SDLK_UP},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
689 {XK_Right, SDLK_RIGHT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
690 {XK_Down, SDLK_DOWN},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
691 {XK_Page_Up, SDLK_PAGEUP},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
692 {XK_Page_Down, SDLK_PAGEDOWN},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
693 {XK_End, SDLK_END},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
694 {XK_Print, SDLK_PRINTSCREEN},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
695 {XK_Insert, SDLK_INSERT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
696 {XK_Menu, SDLK_APPLICATION},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
697 {XK_Break, SDLK_PAUSE},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
698 {XK_Mode_switch, SDLK_MODE},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
699 {XK_Num_Lock, SDLK_KP_NUMLOCKCLEAR},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
700 {XK_KP_Enter, SDLK_KP_ENTER},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
701 {XK_KP_Home, SDLK_KP_7 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
702 {XK_KP_Left, SDLK_KP_4 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
703 {XK_KP_Up, SDLK_KP_8 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
704 {XK_KP_Right, SDLK_KP_6 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
705 {XK_KP_Down, SDLK_KP_2 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
706 {XK_KP_Page_Up, SDLK_KP_9 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
707 {XK_KP_Page_Down, SDLK_KP_3 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
708 {XK_KP_End, SDLK_KP_1 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
709 {XK_KP_Begin, SDLK_KP_5 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
710 {XK_KP_Insert, SDLK_KP_0 | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
711 {XK_KP_Delete, SDLK_KP_PERIOD | X11_KEY_PHYSICAL_ONLY_BIT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
712 {XK_KP_Multiply, '*'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
713 {XK_KP_Multiply, SDLK_KP_MULTIPLY},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
714 {XK_KP_Add, '+'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
715 {XK_KP_Add, SDLK_KP_PLUS},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
716 {XK_KP_Separator, '.'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
717 {XK_KP_Separator, SDLK_KP_PERIOD},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
718 {XK_KP_Subtract, '-'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
719 {XK_KP_Subtract, SDLK_KP_MINUS},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
720 {XK_KP_Decimal, '.'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
721 {XK_KP_Decimal, SDLK_KP_PERIOD},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
722 {XK_KP_Divide, '/'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
723 {XK_KP_Divide, SDLK_KP_DIVIDE},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
724 {XK_KP_0, '0'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
725 {XK_KP_0, SDLK_KP_0},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
726 {XK_KP_1, '1'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
727 {XK_KP_1, SDLK_KP_1},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
728 {XK_KP_2, '2'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
729 {XK_KP_2, SDLK_KP_2},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
730 {XK_KP_3, '3'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
731 {XK_KP_3, SDLK_KP_3},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
732 {XK_KP_4, '4'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
733 {XK_KP_4, SDLK_KP_4},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
734 {XK_KP_5, '5'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
735 {XK_KP_5, SDLK_KP_5},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
736 {XK_KP_6, '6'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
737 {XK_KP_6, SDLK_KP_6},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
738 {XK_KP_7, '7'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
739 {XK_KP_7, SDLK_KP_7},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
740 {XK_KP_8, '8'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
741 {XK_KP_8, SDLK_KP_8},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
742 {XK_KP_9, '9'},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
743 {XK_KP_9, SDLK_KP_9},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
744 {XK_KP_Equal, '='},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
745 {XK_KP_Equal, SDLK_KP_EQUALS},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
746 {XK_F1, SDLK_F1},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
747 {XK_F2, SDLK_F2},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
748 {XK_F3, SDLK_F3},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
749 {XK_F4, SDLK_F4},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
750 {XK_F5, SDLK_F5},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
751 {XK_F6, SDLK_F6},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
752 {XK_F7, SDLK_F7},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
753 {XK_F8, SDLK_F8},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
754 {XK_F9, SDLK_F9},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
755 {XK_F10, SDLK_F10},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
756 {XK_F11, SDLK_F11},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
757 {XK_F12, SDLK_F12},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
758 {XK_F13, SDLK_F13},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
759 {XK_F14, SDLK_F14},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
760 {XK_F15, SDLK_F15},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
761 {XK_F16, SDLK_F16},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
762 {XK_F17, SDLK_F17},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
763 {XK_F18, SDLK_F18},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
764 {XK_F19, SDLK_F19},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
765 {XK_F20, SDLK_F20},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
766 {XK_F21, SDLK_F21},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
767 {XK_F22, SDLK_F22},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
768 {XK_F23, SDLK_F23},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
769 {XK_F24, SDLK_F24},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
770 {XK_Shift_L, SDLK_LSHIFT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
771 {XK_Shift_R, SDLK_RSHIFT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
772 {XK_Control_L, SDLK_LCTRL},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
773 {XK_Control_R, SDLK_RCTRL},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
774 {XK_Caps_Lock, SDLK_CAPSLOCK},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
775 {XK_Shift_Lock, SDLK_CAPSLOCK},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
776 {XK_Meta_L, SDLK_LMETA},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
777 {XK_Meta_R, SDLK_RMETA},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
778 {XK_Alt_L, SDLK_LALT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
779 {XK_Alt_R, SDLK_RALT},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
780 {XK_Super_L, SDLK_LMETA},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
781 {XK_Super_R, SDLK_RMETA},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
782 {XK_Hyper_L, SDLK_LMETA},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
783 {XK_Hyper_R, SDLK_RMETA},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
784 {XK_Delete, SDLK_DELETE},
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
785 {0x1000003, SDLK_KP_ENTER} /* keyboard enter on Mac OS X */
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
786 };
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
787
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
788 /* *INDENT-ON* */
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
789
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
790 /*
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
791 Used for two purposes: - by X11_GetLayoutKey(), with physical =
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
792 false, to convert a KeySym to the corresponding layout key code
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
793 (SDLK_ ones and some character ones - most character KeySyms are
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
794 handled by X11_KeySymToUcs4() after this function returns
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
795 SDLK_UNKNOWN for them). - by X11_InitKeyboard(), with physical =
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
796 true, to build a makeshift translation table based on the KeySyms
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
797 when none of the predefined KeyCode- to-SDLKey tables fits. This
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
798 is *not* correct anywhere but on a US layout, since the
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
799 translation table deals with physical key codes, while the X11
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
800 KeySym corresponds to our concept of a layout key code, but it's
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
801 better than nothing.
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
802 */
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
803
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
804 static SDLKey
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
805 X11_KeySymToSDLKey(KeySym sym, SDL_bool physical)
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
806 {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
807 /* Do a binary search for sym in the keySymToSDLKey table */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
808 SDLKey key = SDLK_UNKNOWN;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
809 int start = -1;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
810 int end = SDL_arraysize(keySymToSDLKey);
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
811 int i;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
812 /* Invariant: keySymToSDLKey[start].sym < sym <
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
813 keySymToSDLKey[end].sym (imagine ...[-1] = -inf and
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
814 ...[arraysize] = inf, these entries needn't be there in reality
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
815 because they're never accessed) */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
816 while (end > start + 1) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
817 i = (start + end) / 2;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
818 if (keySymToSDLKey[i].sym == sym) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
819 /* found an entry, if it's the second of two back up to the first */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
820 if (keySymToSDLKey[i - 1].sym == sym)
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
821 i--;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
822 /* if there are two, the physical one is the second */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
823 if (physical && keySymToSDLKey[i + 1].sym == sym)
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
824 i++;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
825 key = keySymToSDLKey[i].key;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
826 break;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
827 } else if (keySymToSDLKey[i].sym < sym)
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
828 start = i;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
829 else
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
830 end = i;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
831 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
832
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
833 /* if we're being asked for a layout key code, but the table only
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
834 has a physical one, or vice versa, return SDLK_UNKNOWN) */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
835
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
836 if (!physical && ((key & X11_KEY_PHYSICAL_ONLY_BIT) != 0)
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
837 || physical && ((key & SDL_KEY_CAN_BE_PHYSICAL_BIT) == 0))
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
838 key = SDLK_UNKNOWN;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
839 key &= ~X11_KEY_PHYSICAL_ONLY_BIT;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
840 return key;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
841 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
842
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
843 int
1950
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
844 X11_InitKeyboard(_THIS)
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
845 {
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
846 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
847 SDL_Keyboard keyboard;
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
848 SDLKey **table;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
849 SDLKey *foundTable;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
850 int i;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
851 int code;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
852 SDLKey sdlkey;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
853
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
854 /* A random collection of KeySym/SDLKey pairs that should be valid
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
855 in any keyboard layout (if this isn't the case on yours,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
856 please adjust). Using XKeysymToKeycode on these KeySyms
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
857 creates a "fingerprint" of the X server's key-to-KeyCode
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
858 mapping which is then matched against all our predefined
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
859 KeyCodeToSDLK tables to find the right one (if any).
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
860 */
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
861
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
862 /* *INDENT-ON* */
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
863 struct
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
864 {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
865 KeySym sym;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
866 SDLKey key;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
867 } fingerprint[] = {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
868 {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
869 XK_Tab, SDLK_TAB}, {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
870 XK_Return, SDLK_RETURN}, {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
871 XK_Escape, SDLK_ESCAPE}, {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
872 XK_space, SDLK_SPACE}
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
873 };
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
874 /* *INDENT-OFF* */
1950
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
875
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
876 SDL_zero(keyboard);
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
877 data->keyboard = SDL_AddKeyboard(&keyboard, -1);
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
878
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
879 /* Determine which X11 KeyCode to SDL physical key code table to use */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
880
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
881 foundTable = NULL;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
882 table = keyCodeToSDLKeyTables;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
883 while ((NULL == foundTable) && (NULL != (*table))) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
884 foundTable = *table;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
885 for (i = 0; i < SDL_arraysize(fingerprint); i++) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
886 code = XKeysymToKeycode(data->display, fingerprint[i].sym);
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
887 if ((code != 0) && ((*table)[code] != fingerprint[i].key)) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
888 foundTable = NULL;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
889 break;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
890 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
891 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
892 table++;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
893 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
894
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
895 if (NULL != foundTable) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
896 /* Found a suitable one among the predefined tables */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
897 data->keyCodeToSDLKTable = foundTable;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
898 } else {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
899 /* No suitable table found - build a makeshift table based on
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
900 the KeySyms, assuming a US keyboard layout */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
901
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
902 #if 1
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
903 fprintf(stderr,
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
904 "The key codes of your X server are unknown to SDL. Keys may not be recognized properly. To help get this fixed, report this to the SDL mailing list <sdl@libsdl.org> or to Christian Walther <cwalther@gmx.ch>.\n");
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
905 #endif
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
906 data->keyCodeToSDLKTable =
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
907 SDL_malloc(SDL_arraysize(xorgLinuxKeyCodeToSDLK));
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
908 if (data->keyCodeToSDLKTable == NULL) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
909 SDL_OutOfMemory();
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
910 return -1;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
911 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
912 for (code = SDL_arraysize(xorgLinuxKeyCodeToSDLK); code >= 0; code--) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
913 data->keyCodeToSDLKTable[code] =
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
914 X11_KeySymToSDLKey(XKeycodeToKeysym(data->display, code, 0),
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
915 SDL_TRUE);
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
916 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
917 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
918
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
919 /* Set some non-default key names */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
920
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
921 for (code = 0; code < SDL_arraysize(xorgLinuxKeyCodeToSDLK); code++) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
922 sdlkey = data->keyCodeToSDLKTable[code];
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
923 switch (sdlkey) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
924 /* The SDLK_*META keys are used as XK_Meta_* by some X
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
925 servers, as XK_Super_* by others */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
926 case SDLK_LMETA:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
927 case SDLK_RMETA:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
928 switch (XKeycodeToKeysym(data->display, code, 0)) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
929 /* nothing to do for XK_Meta_* because that's already the default name */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
930 case XK_Super_L:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
931 SDL_SetKeyName(sdlkey, "left super");
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
932 break;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
933 case XK_Super_R:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
934 SDL_SetKeyName(sdlkey, "right super");
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
935 break;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
936 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
937 break;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
938 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
939 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
940 SDL_SetKeyName(SDLK_APPLICATION, "menu");
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
941
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
942 return 0;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
943 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
944
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
945 SDLKey
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
946 X11_GetLayoutKey(_THIS, SDLKey physicalKey)
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
947 {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
948 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
949 int code = 0;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
950 KeySym sym;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
951 SDLKey layoutKey;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
952
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
953 switch (physicalKey) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
954 case SDLK_UNKNOWN:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
955 return physicalKey;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
956
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
957 /* Shortcut handling of keypad numbers because on my PC their
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
958 primary KeySyms are not the numbers that I want but
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
959 XK_KP_Home, XK_KP_Up etc. The downside is that this gets us
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
960 latin numerals even on e.g. an Arabic layout. */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
961 case SDLK_KP_1:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
962 return '1';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
963 case SDLK_KP_2:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
964 return '2';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
965 case SDLK_KP_3:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
966 return '3';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
967 case SDLK_KP_4:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
968 return '4';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
969 case SDLK_KP_5:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
970 return '5';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
971 case SDLK_KP_6:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
972 return '6';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
973 case SDLK_KP_7:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
974 return '7';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
975 case SDLK_KP_8:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
976 return '8';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
977 case SDLK_KP_9:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
978 return '9';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
979 case SDLK_KP_0:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
980 return '0';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
981 case SDLK_KP_PERIOD:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
982 return '.';
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
983 default:
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
984 break; /* just to avoid a compiler warning */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
985 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
986
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
987 /* Look up physicalKey to get an X11 KeyCode - linear search isn't
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
988 terribly efficient, this might have to be optimized. */
2296
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
989 while ((code < SDL_arraysize(xorgLinuxKeyCodeToSDLK)) &&
0869721b488f Fixed some typos in SDL_x11keyboard.c
Bob Pendleton <bob@pendleton.com>
parents: 2295
diff changeset
990 (physicalKey != data->keyCodeToSDLKTable[code])) {
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
991 code++;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
992 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
993
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
994 if (code == SDL_arraysize(xorgLinuxKeyCodeToSDLK)) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
995 return physicalKey;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
996 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
997 /* Get the corresponding KeySym - this is where the keyboard
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
998 layout comes into play */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
999 sym = XKeycodeToKeysym(data->display, code, 0);
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1000
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1001 /* Try our own KeySym-to-layout-key-code table: it handles all
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1002 keys whose layout code is an SDLK_ one, including a few where
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1003 X11_KeySymToUcs4() would yield a character, but not a suitable
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1004 one as a key name (e.g. space), and some that are character
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1005 keys for our purposes, but aren't handled by X11_KeySymToUcs4()
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1006 (dead keys, keypad operations). */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1007
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1008 layoutKey = X11_KeySymToSDLKey(sym, SDL_FALSE);
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1009
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1010 /* If it wasn't handled by X11_KeySymToSDLKey(), it's most
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1011 probably a plain character KeySym that X11_KeySymToUcs4()
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1012 (ripped from X.org) knows. */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1013
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1014 if (layoutKey == SDLK_UNKNOWN) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1015 unsigned int ucs = X11_KeySymToUcs4(sym);
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1016 if (ucs != 0)
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1017 layoutKey = (SDLKey) ucs;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1018 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1019
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1020 /* Still no success? Give up. */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1021 if (layoutKey == SDLK_UNKNOWN) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1022 return physicalKey;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1023 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1024
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1025 return layoutKey;
1950
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1026 }
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1027
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1028 void
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1029 X11_QuitKeyboard(_THIS)
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1030 {
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1031 SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1032
2295
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1033 if (data->keyCodeToSDLKTable != NULL) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1034 /* If it's not one of the predefined tables, it was malloced
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1035 and must be freed */
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1036 SDLKey **table = keyCodeToSDLKeyTables;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1037 while (*table != NULL && *table != data->keyCodeToSDLKTable) {
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1038 table++;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1039 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1040 if (*table == NULL)
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1041 SDL_free(data->keyCodeToSDLKTable);
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1042 data->keyCodeToSDLKTable = NULL;
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1043 }
dbc6d1893869 Checking in Christian Walther's patch for x11 keyboard input. Minor code tweaks by Bob.
Bob Pendleton <bob@pendleton.com>
parents: 1950
diff changeset
1044
1950
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1045 SDL_DelKeyboard(data->keyboard);
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1046 }
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1047
a344e42bce3b Started work on the new X11 driver.
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1048 /* vi: set ts=4 sw=4 expandtab: */