2 * Copyright (C) 2007-2013 Team XBMC
5 * This Program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
10 * This Program 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
13 * GNU 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/>.
21 #ifndef _XBMC_keytable_h
22 #define _XBMC_keytable_h
24 typedef struct struct_XBMCKEYTABLE
27 // The sym is a value that identifies which key was pressed. Note
28 // that it specifies the key not the character so it is unaffected by
29 // shift, control, etc.
32 // If the keypress generates a printing character the unicode and
33 // ascii member variables contain the character generated. If the
34 // key is a non-printing character, e.g. a function or arrow key,
35 // the unicode and ascii member variables are zero.
39 // The following two member variables are used to specify the
40 // action/function assigned to a key.
41 // The keynames are used as tags in keyboard.xml. When reading keyboard.xml
42 // TranslateKeyboardString uses the keyname to look up the vkey, and
43 // this is used in the mapping table.
49 bool KeyTableLookupName(const char* keyname, XBMCKEYTABLE* keytable);
50 bool KeyTableLookupSym(uint16_t sym, XBMCKEYTABLE* keytable);
51 bool KeyTableLookupUnicode(uint16_t unicode, XBMCKEYTABLE* keytable);
52 bool KeyTableLookupSymAndUnicode(uint16_t sym, uint16_t unicode, XBMCKEYTABLE* keytable);
53 bool KeyTableLookupVKeyName(uint32_t vkey, XBMCKEYTABLE* keytable);
55 #endif /* _XBMC_keytable_h */