/* * Copyright (c) 2021, Timur Sultanov * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include #include namespace WindowServer { class KeymapSwitcher final : public Core::Object { C_OBJECT(KeymapSwitcher) public: virtual ~KeymapSwitcher() override = default; void next_keymap(); Function on_keymap_change; String get_current_keymap() const; private: void refresh(); KeymapSwitcher(); Vector m_keymaps; void setkeymap(AK::String const&); RefPtr m_file_watcher; char const* m_keyboard_config = "/etc/Keyboard.ini"; }; }