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] <[email protected]>
Co-authored-by: Jonathan White <[email protected]>
This commit is contained in:
CopilotandJonathan White authored and Jonathan White committed 2025-10-25 19:27:03 -04:00
1 parent 2867ef8800
commit dc52620afa
3 files changed
+19 -2

No files matched your search

+15
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);
}
}