From d4097f104e9f9d27da238cdba8e82330de2418d6 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Thu, 3 Mar 2022 22:22:33 +0100 Subject: [PATCH] CharacterMap: Move search selection on arrow press in the search textbox --- Userland/Applications/CharacterMap/CharacterSearchWidget.cpp | 3 +++ 1 file changed, 3 insertions(+) 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("search_button"); m_results_table = find_descendant_of_type_named("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(); };