UI/Qt: Accept all standard back/forward shortcuts

Use Qt's platform shortcut bindings for back and forward navigation
instead of only installing the primary binding. On macOS this keeps
Command-[ and Command-] while also accepting Command-Left and
Command-Right.
This commit is contained in:
Andreas Kling 2026-06-22 00:23:16 +02:00 committed by Andreas Kling
parent b91ff9ebfd
commit 117cef4e92

View file

@ -148,12 +148,12 @@ static void initialize_native_control(WebView::Action& action, QAction& qaction,
case WebView::ActionID::NavigateBack:
if (include_action_icon == IncludeActionIcon::Yes)
qaction.setIcon(create_chrome_icon(ChromeIcon::Back, palette));
qaction.setShortcut(QKeySequence::StandardKey::Back);
qaction.setShortcuts(QKeySequence::keyBindings(QKeySequence::StandardKey::Back));
break;
case WebView::ActionID::NavigateForward:
if (include_action_icon == IncludeActionIcon::Yes)
qaction.setIcon(create_chrome_icon(ChromeIcon::Forward, palette));
qaction.setShortcut(QKeySequence::StandardKey::Forward);
qaction.setShortcuts(QKeySequence::keyBindings(QKeySequence::StandardKey::Forward));
break;
case WebView::ActionID::Reload:
if (include_action_icon == IncludeActionIcon::Yes)