UI/Qt: Add keyboard shortcut to view history

Bind the canonical history shortcut for each platform to the
"View History" action: Ctrl+H on Linux and Windows, and Cmd+Y on
macOS.
This commit is contained in:
Tim Ledbetter 2026-06-16 22:00:48 +01:00 committed by Andreas Kling
parent 766bc991ed
commit d4e15cb0af

View file

@ -193,6 +193,13 @@ static void initialize_native_control(WebView::Action& action, QAction& qaction,
qaction.setIcon(create_chrome_icon(ChromeIcon::Globe, palette));
break;
case WebView::ActionID::ViewHistory:
#if defined(AK_OS_MACOS)
qaction.setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Y));
#else
qaction.setShortcut(QKeySequence(Qt::CTRL | Qt::Key_H));
#endif
break;
case WebView::ActionID::OpenProcessesPage:
qaction.setShortcut(QKeySequence(Qt::CTRL | Qt::SHIFT | Qt::Key_M));
break;