diff --git a/docs/topics/KeyboardShortcuts.adoc b/docs/topics/KeyboardShortcuts.adoc index b968b9813..a0a3455a9 100644 --- a/docs/topics/KeyboardShortcuts.adoc +++ b/docs/topics/KeyboardShortcuts.adoc @@ -36,8 +36,9 @@ kbd:[Ctrl + E] |Copy Password and TOTP | kbd:[Ctrl + Y] |Show TOTP | kbd:[Ctrl + Shift + T] |Trigger AutoType | kbd:[Ctrl + Shift + V] -|Add key to SSH Agent | kbd:[Ctrl + H] -|Remove key from SSH Agent | kbd:[Ctrl + Shift + H] +|Add key to SSH Agent | kbd:[Ctrl + H] +|Remove key from SSH Agent | kbd:[Ctrl + Shift + H] +|Jump to Group (from search) | kbd:[Ctrl + Shift + J] |Move entry up (if unsorted) | kbd:[Ctrl + Alt + Up] |Move entry down (if unsorted) | kbd:[Ctrl + Alt + Down] |Sort Groups A-Z | kbd:[Ctrl + Down] diff --git a/src/gui/entry/EntryView.cpp b/src/gui/entry/EntryView.cpp index 5fdad83b3..74dd2a60f 100644 --- a/src/gui/entry/EntryView.cpp +++ b/src/gui/entry/EntryView.cpp @@ -95,6 +95,7 @@ EntryView::EntryView(QWidget* parent) }); new QShortcut(Qt::CTRL + Qt::Key_F10, this, SLOT(contextMenuShortcutPressed()), nullptr, Qt::WidgetShortcut); + new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_J, this, SLOT(jumpToGroupShortcut()), nullptr, Qt::WidgetShortcut); resetViewToDefaults(); @@ -595,3 +596,17 @@ bool EntryView::isColumnHidden(int logicalIndex) { return header()->isSectionHidden(logicalIndex) || header()->sectionSize(logicalIndex) == 0; } + +void EntryView::jumpToGroupShortcut() +{ + // Only allow jump to group in search mode + if (!inSearchMode()) { + return; + } + + auto entry = currentEntry(); + if (entry) { + // Emit the entryActivated signal with ParentGroup column to trigger jump to group + emit entryActivated(entry, EntryModel::ParentGroup); + } +} diff --git a/src/gui/entry/EntryView.h b/src/gui/entry/EntryView.h index 759097b34..f74e6a3e7 100644 --- a/src/gui/entry/EntryView.h +++ b/src/gui/entry/EntryView.h @@ -72,6 +72,7 @@ private slots: void resetViewToDefaults(); void contextMenuShortcutPressed(); void sortIndicatorChanged(int logicalIndex, Qt::SortOrder order); + void jumpToGroupShortcut(); private: void resetFixedColumns();