summaryrefslogtreecommitdiff
path: root/Userland/Applications/CharacterMap
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2022-03-03 22:22:33 +0100
committerTim Flynn <trflynn89@pm.me>2022-03-04 11:53:04 -0500
commitd4097f104e9f9d27da238cdba8e82330de2418d6 (patch)
treeeb6aecef41846748bdef9daccbc26cf6d8b5b35a /Userland/Applications/CharacterMap
parentd5fdc6096cd549e5571a5f97eedc6f2450826569 (diff)
downloadserenity-d4097f104e9f9d27da238cdba8e82330de2418d6.zip
CharacterMap: Move search selection on arrow press in the search textbox
Diffstat (limited to 'Userland/Applications/CharacterMap')
-rw-r--r--Userland/Applications/CharacterMap/CharacterSearchWidget.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp b/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp
index c27571d64e..b351e01da7 100644
--- a/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp
+++ b/Userland/Applications/CharacterMap/CharacterSearchWidget.cpp
@@ -59,6 +59,9 @@ CharacterSearchWidget::CharacterSearchWidget()
m_search_button = find_descendant_of_type_named<GUI::Button>("search_button");
m_results_table = find_descendant_of_type_named<GUI::TableView>("results_table");
+ m_search_input->on_up_pressed = [this] { m_results_table->move_cursor(GUI::AbstractView::CursorMovement::Up, GUI::AbstractView::SelectionUpdate::Set); };
+ m_search_input->on_down_pressed = [this] { m_results_table->move_cursor(GUI::AbstractView::CursorMovement::Down, GUI::AbstractView::SelectionUpdate::Set); };
+
m_search_input->on_return_pressed = [this] { search(); };
m_search_button->on_click = [this](auto) { search(); };