4 * Copyright (C) 2007-2015 Team Kodi
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Kodi; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 typedef struct struct_XBMCKEYTABLE
26 // The sym is a value that identifies which key was pressed. Note
27 // that it specifies the key not the character so it is unaffected by
28 // shift, control, etc.
31 // If the keypress generates a printing character the unicode and
32 // ascii member variables contain the character generated. If the
33 // key is a non-printing character, e.g. a function or arrow key,
34 // the unicode and ascii member variables are zero.
38 // The following two member variables are used to specify the
39 // action/function assigned to a key.
40 // The keynames are used as tags in keyboard.xml. When reading keyboard.xml
41 // TranslateKeyboardString uses the keyname to look up the vkey, and
42 // this is used in the mapping table.
48 bool KeyTableLookupName(const char* keyname
, XBMCKEYTABLE
* keytable
);
49 bool KeyTableLookupSym(uint16_t sym
, XBMCKEYTABLE
* keytable
);
50 bool KeyTableLookupUnicode(uint16_t unicode
, XBMCKEYTABLE
* keytable
);
51 bool KeyTableLookupSymAndUnicode(uint16_t sym
, uint16_t unicode
, XBMCKEYTABLE
* keytable
);
52 bool KeyTableLookupVKeyName(uint32_t vkey
, XBMCKEYTABLE
* keytable
);