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/>.
23 /* Include file for SDL keyboard event handling */
25 #ifndef _XBMC_keyboard_h
26 #define _XBMC_keyboard_h
30 #include "XBMC_keysym.h"
33 - The scancode is hardware dependent, and should not be used by general
34 applications. If no hardware scancode is available, it will be 0.
36 - The 'unicode' translated character is only available when character
37 translation is enabled by the XBMC_EnableUNICODE() API. If non-zero,
38 this is a UNICODE character corresponding to the keypress. If the
39 high 9 bits of the character are 0, then this maps to the equivalent
42 if ( (keysym.unicode & 0xFF80) == 0 ) {
43 ch = keysym.unicode & 0x7F;
45 An international character..
48 typedef struct XBMC_keysym {
49 unsigned char scancode; /* hardware specific scancode */
50 XBMCKey sym; /* SDL virtual keysym */
51 XBMCMod mod; /* current key modifiers */
52 uint16_t unicode; /* translated character */
55 /* This is the mask which refers to all hotkey bindings */
56 #define XBMC_ALL_HOTKEYS 0xFFFFFFFF
58 #endif /* _XBMC_keyboard_h */