DVDCodecs: Amlogic: Handle conditions in which amcodec should be opened during Open()
[vuplus_xbmc] / xbmc / input / XBMC_keysym.h
1 /*
2     SDL - Simple DirectMedia Layer
3     Copyright (C) 1997-2009 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 General Public License
16     along with XBMC; see the file COPYING.  If not, see
17     <http://www.gnu.org/licenses/>.
18
19     Sam Lantinga
20     slouken@libsdl.org
21 */
22
23 #ifndef XBMC_keysym_h
24 #define XBMC_keysym_h
25
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:
29 //
30 //   http://www.libsdl.org/tmp/SDL-1.3-docs/SDL__keysym_8h.html
31 //
32 // On SDL_KEYDOWN messages the keysym.sym will be one of these values.
33 //
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.
36
37 typedef enum {
38   // The keyboard syms have been cleverly chosen to map to ASCII
39   XBMCK_UNKNOWN     = 0x00,
40   XBMCK_FIRST       = 0x00,
41   XBMCK_BACKSPACE   = 0x08,
42   XBMCK_TAB         = 0x09,
43   XBMCK_CLEAR       = 0x0C,
44   XBMCK_RETURN      = 0x0D,
45   XBMCK_PAUSE       = 0x13,
46   XBMCK_ESCAPE      = 0x1B,
47   XBMCK_SPACE       = 0x20,
48   XBMCK_EXCLAIM     = 0x21,
49   XBMCK_QUOTEDBL    = 0x22,
50   XBMCK_HASH        = 0x23,
51   XBMCK_DOLLAR      = 0x24,
52   XBMCK_PERCENT     = 0x25,
53   XBMCK_AMPERSAND   = 0x26,
54   XBMCK_QUOTE       = 0x27,
55   XBMCK_LEFTPAREN   = 0x28,
56   XBMCK_RIGHTPAREN  = 0x29,
57   XBMCK_ASTERISK    = 0x2A,
58   XBMCK_PLUS        = 0x2B,
59   XBMCK_COMMA       = 0x2C,
60   XBMCK_MINUS       = 0x2D,
61   XBMCK_PERIOD      = 0x2E,
62   XBMCK_SLASH       = 0x2F,
63   XBMCK_0           = 0x30,
64   XBMCK_1           = 0x31,
65   XBMCK_2           = 0x32,
66   XBMCK_3           = 0x33,
67   XBMCK_4           = 0x34,
68   XBMCK_5           = 0x35,
69   XBMCK_6           = 0x36,
70   XBMCK_7           = 0x37,
71   XBMCK_8           = 0x38,
72   XBMCK_9           = 0x39,
73   XBMCK_COLON       = 0x3A,
74   XBMCK_SEMICOLON   = 0x3B,
75   XBMCK_LESS        = 0x3C,
76   XBMCK_EQUALS      = 0x3D,
77   XBMCK_GREATER     = 0x3E,
78   XBMCK_QUESTION    = 0x3F,
79   XBMCK_AT          = 0x40,
80   // Skip uppercase letters
81   XBMCK_LEFTBRACKET = 0x5B,
82   XBMCK_BACKSLASH   = 0x5C,
83   XBMCK_RIGHTBRACKET = 0x5D,
84   XBMCK_CARET       = 0x5E,
85   XBMCK_UNDERSCORE  = 0x5F,
86   XBMCK_BACKQUOTE   = 0x60,
87   XBMCK_a           = 0x61,
88   XBMCK_b           = 0x62,
89   XBMCK_c           = 0x63,
90   XBMCK_d           = 0x64,
91   XBMCK_e           = 0x65,
92   XBMCK_f           = 0x66,
93   XBMCK_g           = 0x67,
94   XBMCK_h           = 0x68,
95   XBMCK_i           = 0x69,
96   XBMCK_j           = 0x6A,
97   XBMCK_k           = 0x6B,
98   XBMCK_l           = 0x6C,
99   XBMCK_m           = 0x6D,
100   XBMCK_n           = 0x6E,
101   XBMCK_o           = 0x6F,
102   XBMCK_p           = 0x70,
103   XBMCK_q           = 0x71,
104   XBMCK_r           = 0x72,
105   XBMCK_s           = 0x73,
106   XBMCK_t           = 0x74,
107   XBMCK_u           = 0x75,
108   XBMCK_v           = 0x76,
109   XBMCK_w           = 0x77,
110   XBMCK_x           = 0x78,
111   XBMCK_y           = 0x79,
112   XBMCK_z           = 0x7A,
113   XBMCK_LEFTBRACE   = 0x7b,
114   XBMCK_PIPE        = 0x7C,
115   XBMCK_RIGHTBRACE  = 0x7D,
116   XBMCK_TILDE       = 0x7E,
117   XBMCK_DELETE = 0x7F,
118   // End of ASCII mapped keysyms
119
120   // Multimedia keys
121   // These are the Windows VK_ codes. SDL doesn't define codes for
122   // these keys.
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
144   // Numeric keypad
145   XBMCK_KP0         = 0x100,
146   XBMCK_KP1         = 0x101,
147   XBMCK_KP2         = 0x102,
148   XBMCK_KP3         = 0x103,
149   XBMCK_KP4         = 0x104,
150   XBMCK_KP5         = 0x105,
151   XBMCK_KP6         = 0x106,
152   XBMCK_KP7         = 0x107,
153   XBMCK_KP8         = 0x108,
154   XBMCK_KP9         = 0x109,
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,
162
163   // Arrows + Home/End pad
164   XBMCK_UP          = 0x111,
165   XBMCK_DOWN        = 0x112,
166   XBMCK_RIGHT       = 0x113,
167   XBMCK_LEFT        = 0x114,
168   XBMCK_INSERT      = 0x115,
169   XBMCK_HOME        = 0x116,
170   XBMCK_END         = 0x117,
171   XBMCK_PAGEUP      = 0x118,
172   XBMCK_PAGEDOWN    = 0x119,
173
174   // Function keys
175   XBMCK_F1          = 0x11A,
176   XBMCK_F2          = 0x11B,
177   XBMCK_F3          = 0x11C,
178   XBMCK_F4          = 0x11D,
179   XBMCK_F5          = 0x11E,
180   XBMCK_F6          = 0x11F,
181   XBMCK_F7          = 0x120,
182   XBMCK_F8          = 0x121,
183   XBMCK_F9          = 0x122,
184   XBMCK_F10         = 0x123,
185   XBMCK_F11         = 0x124,
186   XBMCK_F12         = 0x125,
187   XBMCK_F13         = 0x126,
188   XBMCK_F14         = 0x127,
189   XBMCK_F15         = 0x128,
190
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,
197   XBMCK_RCTRL       = 0x131,
198   XBMCK_LCTRL       = 0x132,
199   XBMCK_RALT        = 0x133,
200   XBMCK_LALT        = 0x134,
201   XBMCK_RMETA       = 0x135,
202   XBMCK_LMETA       = 0x136,
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
207
208   // Miscellaneous function keys
209   XBMCK_HELP        = 0x13B,
210   XBMCK_PRINT       = 0x13C,
211   XBMCK_SYSREQ      = 0x13D,
212   XBMCK_BREAK       = 0x13E,
213   XBMCK_MENU        = 0x13F,
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?)
218
219   // Add any other keys here
220
221         /* Media keys */
222   XBMCK_EJECT             = 333,
223   XBMCK_STOP              = 337,
224   XBMCK_RECORD            = 338,
225   XBMCK_REWIND            = 339,
226   XBMCK_PHONE             = 340,
227   XBMCK_PLAY              = 341,
228   XBMCK_SHUFFLE           = 342,
229   XBMCK_FASTFORWARD       = 343,
230
231   XBMCK_LAST
232 } XBMCKey;
233
234 // Enumeration of valid key mods (possibly OR'd together)
235 typedef enum {
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
251 } XBMCMod;
252
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)
258
259 #endif // XBMC_keysym_h