diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:25:37 +0000 |
commit | 3c206f96fd1e102a13b2971778060fef4be7afbc (patch) | |
tree | 26d54f12b25a491844130c7934c60d97c85807b7 /client/SDL/sdl_kbd.hpp | |
parent | Releasing progress-linux version 3.5.0+dfsg1-1~progress7.99u1. (diff) | |
download | freerdp3-3c206f96fd1e102a13b2971778060fef4be7afbc.tar.xz freerdp3-3c206f96fd1e102a13b2971778060fef4be7afbc.zip |
Merging upstream version 3.5.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'client/SDL/sdl_kbd.hpp')
-rw-r--r-- | client/SDL/sdl_kbd.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/client/SDL/sdl_kbd.hpp b/client/SDL/sdl_kbd.hpp index 2a6c7fa..c75da4d 100644 --- a/client/SDL/sdl_kbd.hpp +++ b/client/SDL/sdl_kbd.hpp @@ -20,6 +20,9 @@ #pragma once #include <string> +#include <map> +#include <list> +#include <atomic> #include <winpr/wtypes.h> #include <freerdp/freerdp.h> @@ -51,6 +54,16 @@ class sdlInput static uint32_t prefKeyValue(const std::string& key, uint32_t fallback = SDL_SCANCODE_UNKNOWN); private: + static std::list<std::string> tokenize(const std::string& data, + const std::string& delimiter = ","); + static bool extract(const std::string& token, uint32_t& key, uint32_t& value); + + uint32_t remapScancode(uint32_t scancode); + void remapInitialize(); + + private: SdlContext* _sdl; Uint32 _lastWindowID; + std::map<uint32_t, uint32_t> _remapList; + std::atomic<bool> _remapInitialized = false; }; |