aboutsummaryrefslogtreecommitdiff
path: root/backends/keymapper/action.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backends/keymapper/action.cpp')
-rw-r--r--backends/keymapper/action.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/backends/keymapper/action.cpp b/backends/keymapper/action.cpp
index 6ee506e7c3..33f5c423b0 100644
--- a/backends/keymapper/action.cpp
+++ b/backends/keymapper/action.cpp
@@ -28,10 +28,8 @@
namespace Common {
-Action::Action(Keymap *boss, const char *i, String des, ActionType typ,
- KeyType prefKey, int pri, int flg)
- : _boss(boss), description(des), type(typ), preferredKey(prefKey),
- priority(pri), flags(flg), _hwKey(0) {
+Action::Action(Keymap *boss, const char *i, String des)
+ : _boss(boss), description(des), _hwInput(0) {
assert(i);
assert(_boss);
@@ -40,18 +38,18 @@ Action::Action(Keymap *boss, const char *i, String des, ActionType typ,
_boss->addAction(this);
}
-void Action::mapKey(const HardwareKey *key) {
- if (_hwKey)
+void Action::mapInput(const HardwareInput *input) {
+ if (_hwInput)
_boss->unregisterMapping(this);
- _hwKey = key;
+ _hwInput = input;
- if (_hwKey)
- _boss->registerMapping(this, _hwKey);
+ if (_hwInput)
+ _boss->registerMapping(this, _hwInput);
}
-const HardwareKey *Action::getMappedKey() const {
- return _hwKey;
+const HardwareInput *Action::getMappedInput() const {
+ return _hwInput;
}
} // End of namespace Common