LibGUI: Actually use the Action alternate shortcut

This adds the actual functionality to Window and Application.
This commit is contained in:
Aatos Majava 2021-06-24 12:42:50 +03:00 committed by Andreas Kling
commit 3e6a5af32b
Notes: sideshowbarker 2024-07-18 11:33:51 +09:00
3 changed files with 4 additions and 2 deletions

View file

@ -829,7 +829,7 @@ Action* Widget::action_for_key_event(const KeyEvent& event)
Action* found_action = nullptr;
for_each_child_of_type<Action>([&](auto& action) {
if (action.shortcut() == shortcut) {
if (action.shortcut() == shortcut || action.alternate_shortcut() == shortcut) {
found_action = &action;
return IterationDecision::Break;
}