AntiMicroX
Loading...
Searching...
No Matches
src
qtuinputkeymapper.h
Go to the documentation of this file.
1
/* antimicrox Gamepad to KB+M event mapper
2
* Copyright (C) 2015 Travis Nickles <nickles.travis@gmail.com>
3
* Copyright (C) 2020 Jagoda Górska <juliagoda.pl@protonmail>
4
*
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 3 of the License, or
8
* (at your option) any later version.
9
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.
14
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef QTUINPUTKEYMAPPER_H
20
#define QTUINPUTKEYMAPPER_H
21
22
#include "
qtkeymapperbase.h
"
23
24
class
QtUInputKeyMapper
:
public
QtKeyMapperBase
25
{
26
Q_OBJECT
27
28
public
:
29
explicit
QtUInputKeyMapper
(QObject *
parent
=
nullptr
);
30
31
protected
:
32
void
populateMappingHashes
()
override
;
33
void
populateCharKeyInformation
()
override
;
34
35
void
populateAlphaHashes
();
36
void
populateFKeyHashes
();
37
void
populateNumPadHashes
();
38
void
populateSpecialCharHashes
();
39
40
private
:
41
void
addVirtualKeyToHash
(
int
key
,
QChar
character
,
charKeyInformation
&
charKeyInfo
);
42
void
mapMiscKeysQtUinput
(
QHash<int, int>
&
qtKeyToVirtKeyHash
);
43
void
mapCursorMovesKeysQtUinput
(
QHash<int, int>
&
qtKeyToVirtKeyHash
);
44
void
mapModifiersKeysQtUinput
(
QHash<int, int>
&
qtKeyToVirtKeyHash
);
45
void
mapKeypadKeysQtUinput
(
QHash<int, int>
&
qtKeyToVirtKeyHash
);
46
void
mapJapanKeysQtUinput
(
QHash<int, int>
&
qtKeyToVirtKeyHash
);
47
void
mapKoreanKeysQtUinput
(
QHash<int, int>
&
qtKeyToVirtKeyHash
);
48
void
mapMediaKeysQtUinput
(
QHash<int, int>
&
qtKeyToVirtKeyHash
);
49
};
50
51
#endif
// QTUINPUTKEYMAPPER_H
JoyDPadXml
Definition
joydpadxml.h:27
QtKeyMapperBase
Base class for platform-specific Qt key mappers.
Definition
qtkeymapperbase.h:42
QtKeyMapperBase::qtKeyToVirtKeyHash
QHash< int, int > qtKeyToVirtKeyHash
Definition
qtkeymapperbase.h:153
QtUInputKeyMapper
Definition
qtuinputkeymapper.h:25
QtUInputKeyMapper::mapKoreanKeysQtUinput
void mapKoreanKeysQtUinput(QHash< int, int > &qtKeyToVirtKeyHash)
Definition
qtuinputkeymapper.cpp:432
QtUInputKeyMapper::mapMiscKeysQtUinput
void mapMiscKeysQtUinput(QHash< int, int > &qtKeyToVirtKeyHash)
Definition
qtuinputkeymapper.cpp:300
QtUInputKeyMapper::populateAlphaHashes
void populateAlphaHashes()
Definition
qtuinputkeymapper.cpp:38
QtUInputKeyMapper::addVirtualKeyToHash
void addVirtualKeyToHash(int key, QChar character, charKeyInformation &charKeyInfo)
Definition
qtuinputkeymapper.cpp:294
QtUInputKeyMapper::populateMappingHashes
void populateMappingHashes() override
Populate the Qt <-> platform virtual key mappings. Implementations must fill qtKeyToVirtKeyHash (Qt -...
Definition
qtuinputkeymapper.cpp:117
QtUInputKeyMapper::mapKeypadKeysQtUinput
void mapKeypadKeysQtUinput(QHash< int, int > &qtKeyToVirtKeyHash)
Definition
qtuinputkeymapper.cpp:379
QtUInputKeyMapper::populateCharKeyInformation
void populateCharKeyInformation() override
Populate virtkeyToCharKeyInfo with character -> VK+modifier info.
Definition
qtuinputkeymapper.cpp:180
QtUInputKeyMapper::populateFKeyHashes
void populateFKeyHashes()
Definition
qtuinputkeymapper.cpp:69
QtUInputKeyMapper::mapModifiersKeysQtUinput
void mapModifiersKeysQtUinput(QHash< int, int > &qtKeyToVirtKeyHash)
Definition
qtuinputkeymapper.cpp:365
QtUInputKeyMapper::populateNumPadHashes
void populateNumPadHashes()
Definition
qtuinputkeymapper.cpp:84
QtUInputKeyMapper::mapCursorMovesKeysQtUinput
void mapCursorMovesKeysQtUinput(QHash< int, int > &qtKeyToVirtKeyHash)
Definition
qtuinputkeymapper.cpp:353
QtUInputKeyMapper::mapJapanKeysQtUinput
void mapJapanKeysQtUinput(QHash< int, int > &qtKeyToVirtKeyHash)
Definition
qtuinputkeymapper.cpp:409
QtUInputKeyMapper::mapMediaKeysQtUinput
void mapMediaKeysQtUinput(QHash< int, int > &qtKeyToVirtKeyHash)
Definition
qtuinputkeymapper.cpp:452
QtUInputKeyMapper::populateSpecialCharHashes
void populateSpecialCharHashes()
Definition
qtuinputkeymapper.cpp:102
qtkeymapperbase.h
QtKeyMapperBase::_charKeyInformation
Information about a printable character key.
Definition
qtkeymapperbase.h:55
Generated by
1.9.8