Skip to content

Commit

Permalink
Add hotkey for search-help
Browse files Browse the repository at this point in the history
Add a new hotkey (CTRL+J) for toggling on/off
the search-help when you are in the search field
Fixes: #4100
  • Loading branch information
0xdeadbeer authored and droidmonkey committed Apr 26, 2024
1 parent d0e9f13 commit 994c5b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/SearchWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <QKeyEvent>
#include <QMenu>
#include <QShortcut>
#include <QToolButton>

#include "core/SignalMultiplexer.h"
Expand All @@ -43,6 +44,8 @@ SearchWidget::SearchWidget(QWidget* parent)
m_searchTimer->setSingleShot(true);
m_clearSearchTimer->setSingleShot(true);

new QShortcut(Qt::CTRL + Qt::Key_J, this, SLOT(toggleHelp()), nullptr, Qt::WidgetWithChildrenShortcut);

connect(m_ui->searchEdit, SIGNAL(textChanged(QString)), SLOT(startSearchTimer()));
connect(m_ui->helpIcon, SIGNAL(triggered()), SLOT(toggleHelp()));
connect(m_ui->searchIcon, SIGNAL(triggered()), SLOT(showSearchMenu()));
Expand Down

0 comments on commit 994c5b7

Please sign in to comment.