Mercurial > sdl-ios-xcode
comparison src/events/scancodes_xfree86.h @ 2305:fbe8ff44c519
First pass of new SDL scancode concept for X11.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 07 Feb 2008 15:31:09 +0000 |
parents | |
children | 620a91b6d263 |
comparison
equal
deleted
inserted
replaced
2304:50f58ce12497 | 2305:fbe8ff44c519 |
---|---|
1 /* | |
2 SDL - Simple DirectMedia Layer | |
3 Copyright (C) 1997-2006 Sam Lantinga | |
4 | |
5 This library is free software; you can redistribute it and/or | |
6 modify it under the terms of the GNU Lesser General Public | |
7 License as published by the Free Software Foundation; either | |
8 version 2.1 of the License, or (at your option) any later version. | |
9 | |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 Lesser General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU Lesser General Public | |
16 License along with this library; if not, write to the Free Software | |
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | |
19 Sam Lantinga | |
20 slouken@libsdl.org | |
21 */ | |
22 #include "../../include/SDL_scancode.h" | |
23 | |
24 /* XFree86 key code to SDL scancode mapping table | |
25 Sources: | |
26 - atKeyNames.h from XFree86 source code | |
27 */ | |
28 /* *INDENT-OFF* */ | |
29 static SDL_scancode xfree86_scancode_table[] = { | |
30 /* 0 */ SDL_SCANCODE_UNKNOWN, | |
31 /* 1 */ SDL_SCANCODE_ESCAPE, | |
32 /* 2 */ SDL_SCANCODE_1, | |
33 /* 3 */ SDL_SCANCODE_2, | |
34 /* 4 */ SDL_SCANCODE_3, | |
35 /* 5 */ SDL_SCANCODE_4, | |
36 /* 6 */ SDL_SCANCODE_5, | |
37 /* 7 */ SDL_SCANCODE_6, | |
38 /* 8 */ SDL_SCANCODE_7, | |
39 /* 9 */ SDL_SCANCODE_8, | |
40 /* 10 */ SDL_SCANCODE_9, | |
41 /* 11 */ SDL_SCANCODE_0, | |
42 /* 12 */ SDL_SCANCODE_MINUS, | |
43 /* 13 */ SDL_SCANCODE_EQUALS, | |
44 /* 14 */ SDL_SCANCODE_BACKSPACE, | |
45 /* 15 */ SDL_SCANCODE_TAB, | |
46 /* 16 */ SDL_SCANCODE_Q, | |
47 /* 17 */ SDL_SCANCODE_W, | |
48 /* 18 */ SDL_SCANCODE_E, | |
49 /* 19 */ SDL_SCANCODE_R, | |
50 /* 20 */ SDL_SCANCODE_T, | |
51 /* 21 */ SDL_SCANCODE_Y, | |
52 /* 22 */ SDL_SCANCODE_U, | |
53 /* 23 */ SDL_SCANCODE_I, | |
54 /* 24 */ SDL_SCANCODE_O, | |
55 /* 25 */ SDL_SCANCODE_P, | |
56 /* 26 */ SDL_SCANCODE_LEFTBRACKET, | |
57 /* 27 */ SDL_SCANCODE_RIGHTBRACKET, | |
58 /* 28 */ SDL_SCANCODE_RETURN, | |
59 /* 29 */ SDL_SCANCODE_LCTRL, | |
60 /* 30 */ SDL_SCANCODE_A, | |
61 /* 31 */ SDL_SCANCODE_S, | |
62 /* 32 */ SDL_SCANCODE_D, | |
63 /* 33 */ SDL_SCANCODE_F, | |
64 /* 34 */ SDL_SCANCODE_G, | |
65 /* 35 */ SDL_SCANCODE_H, | |
66 /* 36 */ SDL_SCANCODE_J, | |
67 /* 37 */ SDL_SCANCODE_K, | |
68 /* 38 */ SDL_SCANCODE_L, | |
69 /* 39 */ SDL_SCANCODE_SEMICOLON, | |
70 /* 40 */ SDL_SCANCODE_APOSTROPHE, | |
71 /* 41 */ SDL_SCANCODE_GRAVE, | |
72 /* 42 */ SDL_SCANCODE_LSHIFT, | |
73 /* 43 */ SDL_SCANCODE_BACKSLASH, | |
74 /* 44 */ SDL_SCANCODE_Z, | |
75 /* 45 */ SDL_SCANCODE_X, | |
76 /* 46 */ SDL_SCANCODE_C, | |
77 /* 47 */ SDL_SCANCODE_V, | |
78 /* 48 */ SDL_SCANCODE_B, | |
79 /* 49 */ SDL_SCANCODE_N, | |
80 /* 50 */ SDL_SCANCODE_M, | |
81 /* 51 */ SDL_SCANCODE_COMMA, | |
82 /* 52 */ SDL_SCANCODE_PERIOD, | |
83 /* 53 */ SDL_SCANCODE_SLASH, | |
84 /* 54 */ SDL_SCANCODE_RSHIFT, | |
85 /* 55 */ SDL_SCANCODE_KP_MULTIPLY, | |
86 /* 56 */ SDL_SCANCODE_LALT, | |
87 /* 57 */ SDL_SCANCODE_SPACE, | |
88 /* 58 */ SDL_SCANCODE_CAPSLOCK, | |
89 /* 59 */ SDL_SCANCODE_F1, | |
90 /* 60 */ SDL_SCANCODE_F2, | |
91 /* 61 */ SDL_SCANCODE_F3, | |
92 /* 62 */ SDL_SCANCODE_F4, | |
93 /* 63 */ SDL_SCANCODE_F5, | |
94 /* 64 */ SDL_SCANCODE_F6, | |
95 /* 65 */ SDL_SCANCODE_F7, | |
96 /* 66 */ SDL_SCANCODE_F8, | |
97 /* 67 */ SDL_SCANCODE_F9, | |
98 /* 68 */ SDL_SCANCODE_F10, | |
99 /* 69 */ SDL_SCANCODE_NUMLOCKCLEAR, | |
100 /* 70 */ SDL_SCANCODE_SCROLLLOCK, | |
101 /* 71 */ SDL_SCANCODE_KP_7, | |
102 /* 72 */ SDL_SCANCODE_KP_8, | |
103 /* 73 */ SDL_SCANCODE_KP_9, | |
104 /* 74 */ SDL_SCANCODE_KP_MINUS, | |
105 /* 75 */ SDL_SCANCODE_KP_4, | |
106 /* 76 */ SDL_SCANCODE_KP_5, | |
107 /* 77 */ SDL_SCANCODE_KP_6, | |
108 /* 78 */ SDL_SCANCODE_KP_PLUS, | |
109 /* 79 */ SDL_SCANCODE_KP_1, | |
110 /* 80 */ SDL_SCANCODE_KP_2, | |
111 /* 81 */ SDL_SCANCODE_KP_3, | |
112 /* 82 */ SDL_SCANCODE_KP_0, | |
113 /* 83 */ SDL_SCANCODE_KP_PERIOD, | |
114 /* 84 */ SDL_SCANCODE_SYSREQ, | |
115 /* 85 */ SDL_SCANCODE_MODE, | |
116 /* 86 */ SDL_SCANCODE_NONUSBACKSLASH, | |
117 /* 87 */ SDL_SCANCODE_F11, | |
118 /* 88 */ SDL_SCANCODE_F12, | |
119 /* 89 */ SDL_SCANCODE_HOME, | |
120 /* 90 */ SDL_SCANCODE_UP, | |
121 /* 91 */ SDL_SCANCODE_PAGEUP, | |
122 /* 92 */ SDL_SCANCODE_LEFT, | |
123 /* 93 */ SDL_SCANCODE_BRIGHTNESSDOWN, /* on PowerBook G4 / KEY_Begin */ | |
124 /* 94 */ SDL_SCANCODE_RIGHT, | |
125 /* 95 */ SDL_SCANCODE_END, | |
126 /* 96 */ SDL_SCANCODE_DOWN, | |
127 /* 97 */ SDL_SCANCODE_PAGEDOWN, | |
128 /* 98 */ SDL_SCANCODE_INSERT, | |
129 /* 99 */ SDL_SCANCODE_DELETE, | |
130 /* 100 */ SDL_SCANCODE_KP_ENTER, | |
131 /* 101 */ SDL_SCANCODE_RCTRL, | |
132 /* 102 */ SDL_SCANCODE_PAUSE, | |
133 /* 103 */ SDL_SCANCODE_PRINTSCREEN, | |
134 /* 104 */ SDL_SCANCODE_KP_DIVIDE, | |
135 /* 105 */ SDL_SCANCODE_RALT, | |
136 /* 106 */ SDL_SCANCODE_UNKNOWN, /* BREAK */ | |
137 /* 107 */ SDL_SCANCODE_LGUI, | |
138 /* 108 */ SDL_SCANCODE_RGUI, | |
139 /* 109 */ SDL_SCANCODE_APPLICATION, | |
140 /* 110 */ SDL_SCANCODE_F13, | |
141 /* 111 */ SDL_SCANCODE_F14, | |
142 /* 112 */ SDL_SCANCODE_F15, | |
143 /* 113 */ SDL_SCANCODE_F16, | |
144 /* 114 */ SDL_SCANCODE_F17, | |
145 /* 115 */ SDL_SCANCODE_UNKNOWN, | |
146 /* 116 */ SDL_SCANCODE_UNKNOWN, /* is translated to XK_ISO_Level3_Shift by my X server, but I have no keyboard that generates this code, so I don't know what the correct SDL_SCANCODE_* for it is */ | |
147 /* 117 */ SDL_SCANCODE_UNKNOWN, | |
148 /* 118 */ SDL_SCANCODE_KP_EQUALS, | |
149 /* 119 */ SDL_SCANCODE_UNKNOWN, | |
150 /* 120 */ SDL_SCANCODE_UNKNOWN, | |
151 /* 121 */ SDL_SCANCODE_UNKNOWN, | |
152 /* 122 */ SDL_SCANCODE_UNKNOWN, | |
153 /* 123 */ SDL_SCANCODE_UNKNOWN, | |
154 /* 124 */ SDL_SCANCODE_UNKNOWN, | |
155 /* 125 */ SDL_SCANCODE_INTERNATIONAL3, /* Yen */ | |
156 /* 126 */ SDL_SCANCODE_UNKNOWN, | |
157 /* 127 */ SDL_SCANCODE_UNKNOWN, | |
158 /* 128 */ SDL_SCANCODE_UNKNOWN, | |
159 /* 129 */ SDL_SCANCODE_UNKNOWN, | |
160 /* 130 */ SDL_SCANCODE_UNKNOWN, | |
161 /* 131 */ SDL_SCANCODE_UNKNOWN, | |
162 /* 132 */ SDL_SCANCODE_POWER, | |
163 /* 133 */ SDL_SCANCODE_MUTE, | |
164 /* 134 */ SDL_SCANCODE_VOLUMEDOWN, | |
165 /* 135 */ SDL_SCANCODE_VOLUMEUP, | |
166 /* 136 */ SDL_SCANCODE_HELP, | |
167 /* 137 */ SDL_SCANCODE_STOP, | |
168 /* 138 */ SDL_SCANCODE_AGAIN, | |
169 /* 139 */ SDL_SCANCODE_UNKNOWN, /* PROPS */ | |
170 /* 140 */ SDL_SCANCODE_UNDO, | |
171 /* 141 */ SDL_SCANCODE_UNKNOWN, /* FRONT */ | |
172 /* 142 */ SDL_SCANCODE_COPY, | |
173 /* 143 */ SDL_SCANCODE_UNKNOWN, /* OPEN */ | |
174 /* 144 */ SDL_SCANCODE_PASTE, | |
175 /* 145 */ SDL_SCANCODE_FIND, | |
176 /* 146 */ SDL_SCANCODE_CUT, | |
177 }; | |
178 /* *INDENT-ON* */ |