1
#ifndef KEYBOARDLAYOUTCONFIGURATION_H
2
#define KEYBOARDLAYOUTCONFIGURATION_H
5
* Copyright (C) 2005-2013 Team XBMC
8
* This Program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2, or (at your option)
13
* This Program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with XBMC; see the file COPYING. If not, see
20
* <http://www.gnu.org/licenses/>.
24
// Comment OUT, if not really debugging!!!
25
// #define DEBUG_KEYBOARD_GETCHAR
28
#include "linux/PlatformDefs.h"
29
#elif defined (TARGET_WINDOWS)
37
#include "utils/log.h"
41
class CKeyboardLayoutConfiguration
44
CKeyboardLayoutConfiguration();
45
~CKeyboardLayoutConfiguration();
47
bool Load(const std::string& strFileName);
49
bool containsChangeXbmcCharRegardlessModifiers(WCHAR key);
50
bool containsChangeXbmcCharWithRalt(WCHAR key);
51
bool containsDeriveXbmcCharFromVkeyRegardlessModifiers(BYTE key);
52
bool containsDeriveXbmcCharFromVkeyWithShift(BYTE key);
53
bool containsDeriveXbmcCharFromVkeyWithRalt(BYTE key);
55
WCHAR valueOfChangeXbmcCharRegardlessModifiers(WCHAR key);
56
WCHAR valueOfChangeXbmcCharWithRalt(WCHAR key);
57
WCHAR valueOfDeriveXbmcCharFromVkeyRegardlessModifiers(BYTE key);
58
WCHAR valueOfDeriveXbmcCharFromVkeyWithShift(BYTE key);
59
WCHAR valueOfDeriveXbmcCharFromVkeyWithRalt(BYTE key);
62
std::map<WCHAR, WCHAR> m_changeXbmcCharRegardlessModifiers;
63
std::map<WCHAR, WCHAR> m_changeXbmcCharWithRalt;
64
std::map<BYTE, WCHAR> m_deriveXbmcCharFromVkeyRegardlessModifiers;
65
std::map<BYTE, WCHAR> m_deriveXbmcCharFromVkeyWithShift;
66
std::map<BYTE, WCHAR> m_deriveXbmcCharFromVkeyWithRalt;
69
void readCharMapFromXML(const TiXmlElement* pXMLMap, std::map<WCHAR, WCHAR>& charToCharMap, const char* mapRootElement);
70
void readByteMapFromXML(const TiXmlElement* pXMLMap, std::map<BYTE, WCHAR>& charToCharMap, const char* mapRootElement);
73
extern CKeyboardLayoutConfiguration g_keyboardLayoutConfiguration;