mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
Base+WindowsServer+keymap: Store multiple keymaps in a config
This commit is contained in:
parent
5a31697bcf
commit
c7bd47c87c
12 changed files with 405 additions and 100 deletions
|
@ -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";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue