From b97ca39360160cc888cf3b7fc554ca5b911284cc Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 19 Oct 2021 22:19:13 +0300 Subject: [PATCH] Fix handling multiple "physical key" events in the single input map action. --- core/os/input_event.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index d262385d210..ad97fac351c 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -329,8 +329,13 @@ bool InputEventKey::shortcut_match(const Ref &p_event, bool p_exact_ return false; } - return scancode == key->scancode && - (!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask()); + if (scancode == 0) { + return physical_scancode == key->physical_scancode && + (!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask()); + } else { + return scancode == key->scancode && + (!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask()); + } } void InputEventKey::_bind_methods() {