Merge pull request #54003 from bruvzg/fix_multi_phy_key_map_4

This commit is contained in:
Rémi Verschelde 2021-10-20 10:56:15 +02:00 committed by GitHub
commit 6d4543ea90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {