2 SDL - Simple DirectMedia Layer
3 Copyright (C) 1997-2009 Sam Lantinga
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.
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.
15 You should have received a copy of the GNU General Public License
16 along with XBMC; see the file COPYING. If not, see
17 <http://www.gnu.org/licenses/>.
26 // The XBMC_keysym identifies a physical key on the keyboard i.e. it is
27 // analogous to a scan code but is hardware independant.
28 // These values are bazsed on the SDL_keysym standards, see:
30 // http://www.libsdl.org/tmp/SDL-1.3-docs/SDL__keysym_8h.html
32 // On SDL_KEYDOWN messages the keysym.sym will be one of these values.
34 // On OSs that don't support SDL (i.e. Windows) the OS dependant key
35 // handling code converts keypresses to an XBMC_keysym value.
38 // The keyboard syms have been cleverly chosen to map to ASCII
41 XBMCK_BACKSPACE
= 0x08,
49 XBMCK_QUOTEDBL
= 0x22,
53 XBMCK_AMPERSAND
= 0x26,
55 XBMCK_LEFTPAREN
= 0x28,
56 XBMCK_RIGHTPAREN
= 0x29,
57 XBMCK_ASTERISK
= 0x2A,
74 XBMCK_SEMICOLON
= 0x3B,
78 XBMCK_QUESTION
= 0x3F,
80 // Skip uppercase letters
81 XBMCK_LEFTBRACKET
= 0x5B,
82 XBMCK_BACKSLASH
= 0x5C,
83 XBMCK_RIGHTBRACKET
= 0x5D,
85 XBMCK_UNDERSCORE
= 0x5F,
86 XBMCK_BACKQUOTE
= 0x60,
113 XBMCK_LEFTBRACE
= 0x7b,
115 XBMCK_RIGHTBRACE
= 0x7D,
118 // End of ASCII mapped keysyms
121 // These are the Windows VK_ codes. SDL doesn't define codes for
123 XBMCK_BROWSER_BACK
= 0xA6,
124 XBMCK_BROWSER_FORWARD
= 0xA7,
125 XBMCK_BROWSER_REFRESH
= 0xA8,
126 XBMCK_BROWSER_STOP
= 0xA9,
127 XBMCK_BROWSER_SEARCH
= 0xAA,
128 XBMCK_BROWSER_FAVORITES
= 0xAB,
129 XBMCK_BROWSER_HOME
= 0xAC,
130 XBMCK_VOLUME_MUTE
= 0xAD,
131 XBMCK_VOLUME_DOWN
= 0xAE,
132 XBMCK_VOLUME_UP
= 0xAF,
133 XBMCK_MEDIA_NEXT_TRACK
= 0xB0,
134 XBMCK_MEDIA_PREV_TRACK
= 0xB1,
135 XBMCK_MEDIA_STOP
= 0xB2,
136 XBMCK_MEDIA_PLAY_PAUSE
= 0xB3,
137 XBMCK_LAUNCH_MAIL
= 0xB4,
138 XBMCK_LAUNCH_MEDIA_SELECT
= 0xB5,
139 XBMCK_LAUNCH_APP1
= 0xB6,
140 XBMCK_LAUNCH_APP2
= 0xB7,
141 XBMCK_LAUNCH_FILE_BROWSER
= 0xB8,
142 XBMCK_LAUNCH_MEDIA_CENTER
= 0xB9,
143 XBMCK_MEDIA_REWIND
= 0xBA,
144 XBMCK_MEDIA_FASTFORWARD
= 0xBB,
157 XBMCK_KP_PERIOD
= 0x10A,
158 XBMCK_KP_DIVIDE
= 0x10B,
159 XBMCK_KP_MULTIPLY
= 0x10C,
160 XBMCK_KP_MINUS
= 0x10D,
161 XBMCK_KP_PLUS
= 0x10E,
162 XBMCK_KP_ENTER
= 0x10F,
163 XBMCK_KP_EQUALS
= 0x110,
165 // Arrows + Home/End pad
170 XBMCK_INSERT
= 0x115,
173 XBMCK_PAGEUP
= 0x118,
174 XBMCK_PAGEDOWN
= 0x119,
193 // Key state modifier keys
194 XBMCK_NUMLOCK
= 0x12C,
195 XBMCK_CAPSLOCK
= 0x12D,
196 XBMCK_SCROLLOCK
= 0x12E,
197 XBMCK_RSHIFT
= 0x12F,
198 XBMCK_LSHIFT
= 0x130,
205 XBMCK_LSUPER
= 0x137, // Left "Windows" key
206 XBMCK_RSUPER
= 0x138, // Right "Windows" key
207 XBMCK_MODE
= 0x139, // "Alt Gr" key
208 XBMCK_COMPOSE
= 0x13A, // Multi-key compose key
210 // Miscellaneous function keys
213 XBMCK_SYSREQ
= 0x13D,
216 XBMCK_POWER
= 0x140, // Power Macintosh power key
217 XBMCK_EURO
= 0x141, // Some european keyboards
218 XBMCK_UNDO
= 0x142, // Atari keyboard has Undo
219 XBMCK_SLEEP
= 0x143, // Sleep button on Nyxboard remote (and others?)
221 XBMCK_SETTINGS
= 0x145,
225 XBMCK_YELLOW
= 0x149,
229 XBMCK_FAVORITES
= 0x14d,
230 XBMCK_HOMEPAGE
= 0x14e,
231 XBMCK_CONFIG
= 0x14f,
234 // Add any other keys here
244 XBMCK_FASTFORWARD
= 343,
249 // Enumeration of valid key mods (possibly OR'd together)
251 XBMCKMOD_NONE
= 0x0000,
252 XBMCKMOD_LSHIFT
= 0x0001,
253 XBMCKMOD_RSHIFT
= 0x0002,
254 XBMCKMOD_LSUPER
= 0x0010,
255 XBMCKMOD_RSUPER
= 0x0020,
256 XBMCKMOD_LCTRL
= 0x0040,
257 XBMCKMOD_RCTRL
= 0x0080,
258 XBMCKMOD_LALT
= 0x0100,
259 XBMCKMOD_RALT
= 0x0200,
260 XBMCKMOD_LMETA
= 0x0400,
261 XBMCKMOD_RMETA
= 0x0800,
262 XBMCKMOD_NUM
= 0x1000,
263 XBMCKMOD_CAPS
= 0x2000,
264 XBMCKMOD_MODE
= 0x4000,
265 XBMCKMOD_RESERVED
= 0x8000
268 #define XBMCKMOD_CTRL (XBMCKMOD_LCTRL | XBMCKMOD_RCTRL)
269 #define XBMCKMOD_SHIFT (XBMCKMOD_LSHIFT | XBMCKMOD_RSHIFT)
270 #define XBMCKMOD_ALT (XBMCKMOD_LALT | XBMCKMOD_RALT)
271 #define XBMCKMOD_META (XBMCKMOD_LMETA | XBMCKMOD_RMETA)
272 #define XBMCKMOD_SUPER (XBMCKMOD_LSUPER | XBMCKMOD_RSUPER)
274 #endif // XBMC_keysym_h