mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-24 11:01:38 -08:00
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:
1 parent
2867ef8800
commit
dc52620afa
3 files changed
+19
-2
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user