diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-10-19 22:19:41 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-10-19 22:19:41 +0300 |
commit | a975682ef62875837c440b30ed17c389321c5597 (patch) | |
tree | b0724fd878ac63a21b7f93dd822cd9b969741085 /core | |
parent | a4fbb67902f493bff503dafd0ccc6277af85f3a1 (diff) |
Fix handling multiple "physical key" events in the single input map action.
Diffstat (limited to 'core')
-rw-r--r-- | core/input/input_event.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/input/input_event.cpp b/core/input/input_event.cpp index 1d2b5f19ee..c6448b1e44 100644 --- a/core/input/input_event.cpp +++ b/core/input/input_event.cpp @@ -452,8 +452,13 @@ bool InputEventKey::is_match(const Ref<InputEvent> &p_event, bool p_exact_match) return false; } - return keycode == key->keycode && - (!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask()); + if (keycode == 0) { + return physical_keycode == key->physical_keycode && + (!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask()); + } else { + return keycode == key->keycode && + (!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask()); + } } void InputEventKey::_bind_methods() { |