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,
155 XBMCK_KP_PERIOD = 0x10A,
156 XBMCK_KP_DIVIDE = 0x10B,
157 XBMCK_KP_MULTIPLY = 0x10C,
158 XBMCK_KP_MINUS = 0x10D,
159 XBMCK_KP_PLUS = 0x10E,
160 XBMCK_KP_ENTER = 0x10F,
161 XBMCK_KP_EQUALS = 0x110,
163 // Arrows + Home/End pad
168 XBMCK_INSERT = 0x115,
171 XBMCK_PAGEUP = 0x118,
172 XBMCK_PAGEDOWN = 0x119,
191 // Key state modifier keys
192 XBMCK_NUMLOCK = 0x12C,
193 XBMCK_CAPSLOCK = 0x12D,
194 XBMCK_SCROLLOCK = 0x12E,
195 XBMCK_RSHIFT = 0x12F,
196 XBMCK_LSHIFT = 0x130,
203 XBMCK_LSUPER = 0x137, // Left "Windows" key
204 XBMCK_RSUPER = 0x138, // Right "Windows" key
205 XBMCK_MODE = 0x139, // "Alt Gr" key
206 XBMCK_COMPOSE = 0x13A, // Multi-key compose key
208 // Miscellaneous function keys
211 XBMCK_SYSREQ = 0x13D,
214 XBMCK_POWER = 0x140, // Power Macintosh power key
215 XBMCK_EURO = 0x141, // Some european keyboards
216 XBMCK_UNDO = 0x142, // Atari keyboard has Undo
217 XBMCK_SLEEP = 0x143, // Sleep button on Nyxboard remote (and others?)
219 // Add any other keys here
229 XBMCK_FASTFORWARD = 343,
234 // Enumeration of valid key mods (possibly OR'd together)
236 XBMCKMOD_NONE = 0x0000,
237 XBMCKMOD_LSHIFT = 0x0001,
238 XBMCKMOD_RSHIFT = 0x0002,
239 XBMCKMOD_LSUPER = 0x0010,
240 XBMCKMOD_RSUPER = 0x0020,
241 XBMCKMOD_LCTRL = 0x0040,
242 XBMCKMOD_RCTRL = 0x0080,
243 XBMCKMOD_LALT = 0x0100,
244 XBMCKMOD_RALT = 0x0200,
245 XBMCKMOD_LMETA = 0x0400,
246 XBMCKMOD_RMETA = 0x0800,
247 XBMCKMOD_NUM = 0x1000,
248 XBMCKMOD_CAPS = 0x2000,
249 XBMCKMOD_MODE = 0x4000,
250 XBMCKMOD_RESERVED = 0x8000
253 #define XBMCKMOD_CTRL (XBMCKMOD_LCTRL | XBMCKMOD_RCTRL)
254 #define XBMCKMOD_SHIFT (XBMCKMOD_LSHIFT | XBMCKMOD_RSHIFT)
255 #define XBMCKMOD_ALT (XBMCKMOD_LALT | XBMCKMOD_RALT)
256 #define XBMCKMOD_META (XBMCKMOD_LMETA | XBMCKMOD_RMETA)
257 #define XBMCKMOD_SUPER (XBMCKMOD_LSUPER | XBMCKMOD_RSUPER)
259 #endif // XBMC_keysym_h