From 382dfbc2fac20e41adb56285313315425e8e4f50 Mon Sep 17 00:00:00 2001 From: pajlada Date: Sat, 18 Jul 2020 11:52:12 -0400 Subject: [PATCH] [SearchPopup] CTRL+F now focuses the search input (#1812) --- CHANGELOG.md | 1 + src/widgets/helper/SearchPopup.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6825bc08..f8ff8efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Minor: Emotes in the emote popup are now sorted in the same order as the tab completion (#1549) - Minor: Removed "Online Logs" functionality as services are shut down (#1640) - Minor: CTRL+F now selects the Find text input field in the Settings Dialog (#1806 #1811) +- Minor: CTRL+F now selects the search text input field in the Search Popup (#1812) - Bugfix: Fix preview on hover not working when Animated emotes options was disabled (#1546) - Bugfix: FFZ custom mod badges no longer scale with the emote scale options (#1602) - Bugfix: MacOS updater looked for non-existing fields, causing it to always fail the update check (#1642) diff --git a/src/widgets/helper/SearchPopup.cpp b/src/widgets/helper/SearchPopup.cpp index 82abf5f0..beaaf805 100644 --- a/src/widgets/helper/SearchPopup.cpp +++ b/src/widgets/helper/SearchPopup.cpp @@ -10,6 +10,7 @@ #include "messages/search/AuthorPredicate.hpp" #include "messages/search/LinkPredicate.hpp" #include "messages/search/SubstringPredicate.hpp" +#include "util/Shortcut.hpp" #include "widgets/helper/ChannelView.hpp" namespace chatterino { @@ -51,6 +52,11 @@ SearchPopup::SearchPopup() { this->initLayout(); this->resize(400, 600); + + createShortcut(this, "CTRL+F", [this] { + this->searchInput_->setFocus(); + this->searchInput_->selectAll(); + }); } void SearchPopup::setChannel(const ChannelPtr &channel)