summaryrefslogtreecommitdiff
path: root/Userland/Services/WindowServer/KeymapSwitcher.h
diff options
context:
space:
mode:
authorTimur Sultanov <SultanovTS@yandex.ru>2022-01-18 16:00:49 +0300
committerAndreas Kling <kling@serenityos.org>2022-02-03 00:47:22 +0100
commit68a01f0e273675ba225e29c1522d997a5d898e61 (patch)
treefbf78f3de670fde5069d9be67aee3b9a287b3439 /Userland/Services/WindowServer/KeymapSwitcher.h
parent181d1e2dd6afd89d8e56f9aa7effd3dbca08b2f2 (diff)
downloadserenity-68a01f0e273675ba225e29c1522d997a5d898e61.zip
WindowManager: Basic support for system keymap switching
Diffstat (limited to 'Userland/Services/WindowServer/KeymapSwitcher.h')
-rw-r--r--Userland/Services/WindowServer/KeymapSwitcher.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/Userland/Services/WindowServer/KeymapSwitcher.h b/Userland/Services/WindowServer/KeymapSwitcher.h
new file mode 100644
index 0000000000..c9f6a0b77c
--- /dev/null
+++ b/Userland/Services/WindowServer/KeymapSwitcher.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/String.h>
+#include <AK/Vector.h>
+#include <AK/WeakPtr.h>
+#include <LibCore/Object.h>
+#include <LibKeyboard/CharacterMap.h>
+
+namespace WindowServer {
+
+class KeymapSwitcher final : public Core::Object {
+ C_OBJECT(KeymapSwitcher)
+public:
+ static KeymapSwitcher& the();
+
+ virtual ~KeymapSwitcher() override;
+
+ void refresh();
+
+ void next_keymap();
+
+private:
+ KeymapSwitcher();
+
+ Vector<AK::String> m_keymaps;
+
+ void setkeymap(AK::String const&);
+ String get_current_keymap() const;
+};
+
+}