1
Fork 0
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:
Timur Sultanov 2022-01-18 16:00:49 +03:00 committed by Andreas Kling
parent 181d1e2dd6
commit 68a01f0e27
6 changed files with 150 additions and 3 deletions

View 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;
};
}