diff options
author | Timur Sultanov <SultanovTS@yandex.ru> | 2022-01-19 18:20:42 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-02-03 00:47:22 +0100 |
commit | c7bd47c87c002a7ee9e4484bf21781e0dbc05614 (patch) | |
tree | 70f8b90a2ca05f8b71e2d0a01cd1d6fa74cf4888 /Userland/Services/WindowServer/KeymapSwitcher.h | |
parent | 5a31697bcf44920e50b8f98c7bf1469a959a0900 (diff) | |
download | serenity-c7bd47c87c002a7ee9e4484bf21781e0dbc05614.zip |
Base+WindowsServer+keymap: Store multiple keymaps in a config
Diffstat (limited to 'Userland/Services/WindowServer/KeymapSwitcher.h')
-rw-r--r-- | Userland/Services/WindowServer/KeymapSwitcher.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Userland/Services/WindowServer/KeymapSwitcher.h b/Userland/Services/WindowServer/KeymapSwitcher.h index 04dfb09b61..d87d0b7d20 100644 --- a/Userland/Services/WindowServer/KeymapSwitcher.h +++ b/Userland/Services/WindowServer/KeymapSwitcher.h @@ -9,6 +9,7 @@ #include <AK/String.h> #include <AK/Vector.h> #include <AK/WeakPtr.h> +#include <LibCore/FileWatcher.h> #include <LibCore/Object.h> #include <LibKeyboard/CharacterMap.h> #include <WindowServer/WMClientConnection.h> @@ -20,8 +21,6 @@ class KeymapSwitcher final : public Core::Object { public: virtual ~KeymapSwitcher() override; - void refresh(); - void next_keymap(); Function<void(String const& keymap)> on_keymap_change; @@ -29,11 +28,17 @@ public: String get_current_keymap() const; private: + void refresh(); + KeymapSwitcher(); Vector<AK::String> m_keymaps; void setkeymap(AK::String const&); + + RefPtr<Core::FileWatcher> m_file_watcher; + + const char* m_keyboard_config = "/etc/Keyboard.ini"; }; } |