Add keyboard shortcut to "Jump to Group" from search results (#12225)

* Add Ctrl+Shift+J keyboard shortcut for "Jump to Group" from search results

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Jonathan White <support@dmapps.us>
This commit is contained in:
Copilot 2025-09-07 10:36:20 -04:00 committed by GitHub
parent 41da5b2127
commit 83d1003ec2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 2 deletions

View file

@ -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]

View file

@ -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);
}
}

View file

@ -72,6 +72,7 @@ private slots:
void resetViewToDefaults();
void contextMenuShortcutPressed();
void sortIndicatorChanged(int logicalIndex, Qt::SortOrder order);
void jumpToGroupShortcut();
private:
void resetFixedColumns();