mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:47:47 +00:00
Ladybird/Tab: Make back/forward keyboard shortcuts platform-specific
This commit changes how we set the back and forward button key bindings to use platform-specific standard key sequences. For example, in Mac OS X, the back action will be now triggered via Cmd+← and Cmd+[, whereas previously the action was mapped to Alt+←, which is not standard in Mac OS X.
This commit is contained in:
parent
617aba2420
commit
ea3e9a3102
1 changed files with 2 additions and 2 deletions
|
@ -46,9 +46,9 @@ Tab::Tab(QMainWindow* window)
|
|||
auto home_icon_path = QString("%1/res/icons/16x16/go-home.png").arg(s_serenity_resource_root.characters());
|
||||
auto reload_icon_path = QString("%1/res/icons/16x16/reload.png").arg(s_serenity_resource_root.characters());
|
||||
m_back_action = make<QAction>(QIcon(back_icon_path), "Back");
|
||||
m_back_action->setShortcut(QKeySequence("Alt+Left"));
|
||||
m_back_action->setShortcuts(QKeySequence::keyBindings(QKeySequence::StandardKey::Back));
|
||||
m_forward_action = make<QAction>(QIcon(forward_icon_path), "Forward");
|
||||
m_forward_action->setShortcut(QKeySequence("Alt+Right"));
|
||||
m_forward_action->setShortcuts(QKeySequence::keyBindings(QKeySequence::StandardKey::Forward));
|
||||
m_home_action = make<QAction>(QIcon(home_icon_path), "Home");
|
||||
m_reload_action = make<QAction>(QIcon(reload_icon_path), "Reload");
|
||||
m_reload_action->setShortcut(QKeySequence("Ctrl+R"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue