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
3 changed files with 19 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ kbd:[Ctrl + E]
|Trigger AutoType | kbd:[Ctrl + Shift + V]
|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();