diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-10-20 10:56:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 10:56:15 +0200 |
commit | 6d4543ea90a84de0554a99f1bd58e4c07a1054cd (patch) | |
tree | 18a49220dc1b8c8f53c583ca69110d2e67871a68 | |
parent | 9e44a8e5975163c3db380bbdaefd9a88a47f4f51 (diff) | |
parent | a975682ef62875837c440b30ed17c389321c5597 (diff) |
Merge pull request #54003 from bruvzg/fix_multi_phy_key_map_4
-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() { |