diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2021-11-20 15:49:18 +0000 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-11-20 21:05:20 +0000 |
commit | c6099eca5ce609175e3ce113c87405ba2486e9b4 (patch) | |
tree | 5e4d1c8fb9a2bbfd0d42dd8b20f7a3bef5429013 /Userland/Applications/KeyboardSettings/Keyboard.gml | |
parent | 0a2b6b64c6b7af955a6b0c29b13da255d40f35ae (diff) | |
download | serenity-c6099eca5ce609175e3ce113c87405ba2486e9b4.zip |
KeyboardSettings: Add text area to test the currently selected keymap
Right now, this is a bit of a hack. We can't set a keymap to only apply
to the test area, so we set the system keymap instead, while also
keeping track of the "real" current keymap. Whenever the settings are
applied, we update what that "real" keymap is, and when we exit, we
revert to that keymap.
Basically, it behaves as you would expect, apart from it also affecting
other applications you are typing in while the KeyboardSettings window
is open with a different keymap selected.
Diffstat (limited to 'Userland/Applications/KeyboardSettings/Keyboard.gml')
-rw-r--r-- | Userland/Applications/KeyboardSettings/Keyboard.gml | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Userland/Applications/KeyboardSettings/Keyboard.gml b/Userland/Applications/KeyboardSettings/Keyboard.gml index 0e09cb125c..2b17df82c0 100644 --- a/Userland/Applications/KeyboardSettings/Keyboard.gml +++ b/Userland/Applications/KeyboardSettings/Keyboard.gml @@ -8,7 +8,7 @@ @GUI::GroupBox { title: "Mapping" - fixed_height: 60 + fixed_height: 200 layout: @GUI::VerticalBoxLayout { margins: [16, 8, 8] @@ -30,6 +30,27 @@ name: "character_map_file_combo" } } + + @GUI::Widget { + layout: @GUI::HorizontalBoxLayout { + spacing: 16 + } + + @GUI::Label { + text: "Test your current keymap below" + text_alignment: "CenterLeft" + } + @GUI::Button { + text: "Clear" + name: "button_clear_test_typing_area" + fixed_width: 48 + } + } + + @GUI::TextEditor { + fixed_height: 100 + name: "test_typing_area" + } } @GUI::GroupBox { |