From bc0146932eff7346b8450cd764849a6bb90786e6 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 12 May 2021 20:58:09 +0200 Subject: [PATCH] LibGUI: Never resolve Key_Invalid to a GUI::Action Fixes #7047. --- Userland/Libraries/LibGUI/WindowServerConnection.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Userland/Libraries/LibGUI/WindowServerConnection.cpp b/Userland/Libraries/LibGUI/WindowServerConnection.cpp index 4cf36d658c..492ea7c421 100644 --- a/Userland/Libraries/LibGUI/WindowServerConnection.cpp +++ b/Userland/Libraries/LibGUI/WindowServerConnection.cpp @@ -113,6 +113,9 @@ void WindowServerConnection::window_left(i32 window_id) static Action* action_for_key_event(Window& window, KeyEvent const& event) { + if (event.key() == KeyCode::Key_Invalid) + return nullptr; + dbgln_if(KEYBOARD_SHORTCUTS_DEBUG, "Looking up action for {}", event.to_string()); for (auto* widget = window.focused_widget(); widget; widget = widget->parent_widget()) {