Fix Alt+R collision: move symbol switcher to Alt+G

The default radial key trigger is Alt+R (radialconfig), and the new
symbol switcher had also claimed Alt+R with ApplicationShortcut on the
same window — an ambiguous-shortcut conflict. Move Go-to-Symbol to Alt+G
(mnemonic: Go to), leaving Alt+R to the radial. Updated the M-x hint and
plan docs.
This commit is contained in:
Levi Neely 2026-10-07 20:54:41 +02:00
parent 1e9ee0e665
commit cf0cf7e950
2 changed files with 10 additions and 7 deletions

View File

@ -216,7 +216,7 @@ Therefore the palette is replaced, not extended, and the replacement is built on
--excmd=number --sort=no` (file list fed on stdin so a big project never
overflows ARG_MAX; paths relative to the root). Each `Symbol` carries
name / file / line / kind / scope.
- Wired into the plugin: **Alt+R** "Go to Symbol (project)" opens a third
- Wired into the plugin: **Alt+G** "Go to Symbol (project)" opens a third
PaletteWidget of the project's symbols. The label is
`Scope::name — kind file` — the name leads (so a name hit ranks first)
while the kind and file are both visible and filterable in the same query
@ -224,6 +224,7 @@ Therefore the palette is replaced, not extended, and the replacement is built on
`MainWindow::openUrl` and jumps the cursor to the symbol's line (ctags
1-based → cursor 0-based). Also in the M-x palette (`ollie:switch:symbol`)
and reachable from a radial by objectName `ollie_goto_symbol`.
(Alt+R is reserved for the radial key trigger, so this uses Alt+G.)
## Build and test

View File

@ -241,12 +241,14 @@ OllieView::OllieView(OlliePlugin *plugin, KTextEditor::MainWindow *mainWindow)
w->addAction(gotoFileAction);
}
// Project "Go to Symbol" switcher: Alt+R (single modifier). Lists ctags
// symbols across the project's files, scoped to the same root as the file
// switcher. Activation opens the file and jumps to the symbol's line.
// Project "Go to Symbol" switcher: Alt+G (single modifier; "Go to symbol").
// Alt+R is reserved for the radial key trigger, so the symbol switcher uses
// Alt+G instead. Lists ctags symbols across the project's files, scoped to
// the same root as the file switcher. Activation opens the file and jumps to
// the symbol's line.
auto *gotoSymbolAction = new QAction(i18n("Go to Symbol (project)"), this);
gotoSymbolAction->setObjectName(QStringLiteral("ollie_goto_symbol"));
gotoSymbolAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_R));
gotoSymbolAction->setShortcut(QKeySequence(Qt::ALT | Qt::Key_G));
gotoSymbolAction->setShortcutContext(Qt::ApplicationShortcut);
connect(gotoSymbolAction, &QAction::triggered, this, &OllieView::showSymbolSwitcher);
if (QWidget *w = m_mainWindow->window()) {
@ -429,12 +431,12 @@ void OllieView::showCommandPalette()
items.push_back(item);
}
// Offer the project symbol switcher as a palette entry too (also on Alt+R).
// Offer the project symbol switcher as a palette entry too (also on Alt+G).
{
PaletteItem item;
item.id = QStringLiteral("ollie:switch:symbol");
item.label = i18n("Go to Symbol (project)");
item.group = QStringLiteral("Alt+R");
item.group = QStringLiteral("Alt+G");
items.push_back(item);
}