diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/keymapper/keymap.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/backends/keymapper/keymap.h b/backends/keymapper/keymap.h index 615fd9097d..5bb277c924 100644 --- a/backends/keymapper/keymap.h +++ b/backends/keymapper/keymap.h @@ -36,6 +36,7 @@ #include "common/keyboard.h" #include "common/list.h" #include "backends/keymapper/action.h" +#include "backends/keymapper/hardware-key.h" namespace Common { @@ -53,6 +54,17 @@ template<> struct Hash<KeyState> } }; +/** + * Hash function for ActionKey + */ +template<> struct Hash<ActionKey> + : public UnaryFunction<ActionKey, uint> { + + uint operator()(const ActionKey &val) const { + return (uint)val.keycode | ((uint)val.flags << 24); + } +}; + class Keymap { public: Keymap(const String& name, Keymap *parent = 0) : _name(name), _parent(parent) {} @@ -90,7 +102,6 @@ public: /** * Save this keymap's mappings to the config manager * @note Changes are *not* flushed to disk, to do so call ConfMan.flushToDisk() - * @note Changes are *not* flushed to disk, to do so call ConfMan.flushToDisk() */ void saveMappings(); |