diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/input/KeyCharacterMap.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/input/KeyCharacterMap.h b/include/input/KeyCharacterMap.h index 585ea3c315..1c9a5eaac1 100644 --- a/include/input/KeyCharacterMap.h +++ b/include/input/KeyCharacterMap.h @@ -18,6 +18,7 @@ #define _LIBINPUT_KEY_CHARACTER_MAP_H #include <stdint.h> +#include <list> #ifdef __linux__ #include <binder/IBinder.h> @@ -152,29 +153,22 @@ public: private: struct Behavior { - Behavior(); - Behavior(const Behavior& other); - - /* The next behavior in the list, or NULL if none. */ - Behavior* next; - /* The meta key modifiers for this behavior. */ - int32_t metaState; + int32_t metaState = 0; /* The character to insert. */ - char16_t character; + char16_t character = 0; /* The fallback keycode if the key is not handled. */ - int32_t fallbackKeyCode; + int32_t fallbackKeyCode = 0; /* The replacement keycode if the key has to be replaced outright. */ - int32_t replacementKeyCode; + int32_t replacementKeyCode = 0; }; struct Key { Key(); Key(const Key& other); - ~Key(); /* The single character label printed on the key, or 0 if none. */ char16_t label; @@ -184,7 +178,7 @@ private: /* The list of key behaviors sorted from most specific to least specific * meta key binding. */ - Behavior* firstBehavior; + std::list<Behavior> behaviors; }; class Parser { |