mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:47:35 +00:00
WindowManager: Basic support for system keymap switching
This commit is contained in:
parent
181d1e2dd6
commit
68a01f0e27
6 changed files with 150 additions and 3 deletions
37
Userland/Services/WindowServer/KeymapSwitcher.h
Normal file
37
Userland/Services/WindowServer/KeymapSwitcher.h
Normal file
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue