1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:07:35 +00:00

KeyboardSettings: Allow changing and applying active keymap

Previously only the list of allowed keymaps could be modified and
applied to the system.

Add a new button to activate the selected keymap from the list. When
applying the changes to the system, also apply the active keymap.
This commit is contained in:
Nícolas F. R. A. Prado 2022-02-24 22:17:44 -05:00 committed by Andreas Kling
parent a48d7d6adc
commit 2c44c7fc89
3 changed files with 40 additions and 9 deletions

View file

@ -26,14 +26,16 @@ public:
private:
KeyboardSettingsWidget();
void set_keymaps(Vector<String> const& keymaps);
void set_keymaps(Vector<String> const& keymaps, String const& active_keymap);
Vector<String> m_initial_keymap_list;
String m_initial_active_keymap;
RefPtr<GUI::ListView> m_selected_keymaps_listview;
RefPtr<GUI::Label> m_active_keymap_label;
RefPtr<GUI::CheckBox> m_num_lock_checkbox;
RefPtr<GUI::Button> m_activate_keymap_button;
RefPtr<GUI::Button> m_add_keymap_button;
RefPtr<GUI::Button> m_remove_keymap_button;
RefPtr<GUI::TextEditor> m_test_typing_area;