mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:07:36 +00:00
WindowServer+Keymap+LibGUI: Add widget to display current keymap
This commit is contained in:
parent
68a01f0e27
commit
b9c558f6c6
14 changed files with 160 additions and 17 deletions
|
@ -11,27 +11,29 @@
|
|||
#include <AK/WeakPtr.h>
|
||||
#include <LibCore/Object.h>
|
||||
#include <LibKeyboard/CharacterMap.h>
|
||||
#include <WindowServer/WMClientConnection.h>
|
||||
|
||||
namespace WindowServer {
|
||||
|
||||
class KeymapSwitcher final : public Core::Object {
|
||||
C_OBJECT(KeymapSwitcher)
|
||||
public:
|
||||
static KeymapSwitcher& the();
|
||||
|
||||
virtual ~KeymapSwitcher() override;
|
||||
|
||||
void refresh();
|
||||
|
||||
void next_keymap();
|
||||
|
||||
Function<void(String const& keymap)> on_keymap_change;
|
||||
|
||||
String get_current_keymap() const;
|
||||
|
||||
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