|
@@ -739,6 +739,11 @@ bool Widget::is_backmost() const
|
|
Action* Widget::action_for_key_event(const KeyEvent& event)
|
|
Action* Widget::action_for_key_event(const KeyEvent& event)
|
|
{
|
|
{
|
|
Shortcut shortcut(event.modifiers(), (KeyCode)event.key());
|
|
Shortcut shortcut(event.modifiers(), (KeyCode)event.key());
|
|
|
|
+
|
|
|
|
+ if (!shortcut.is_valid()) {
|
|
|
|
+ return nullptr;
|
|
|
|
+ }
|
|
|
|
+
|
|
Action* found_action = nullptr;
|
|
Action* found_action = nullptr;
|
|
for_each_child_of_type<Action>([&](auto& action) {
|
|
for_each_child_of_type<Action>([&](auto& action) {
|
|
if (action.shortcut() == shortcut) {
|
|
if (action.shortcut() == shortcut) {
|