Fix handling multiple "physical key" events in the single input map action.

This commit is contained in:
bruvzg 2021-10-19 22:19:41 +03:00
parent a4fbb67902
commit a975682ef6
1 changed files with 7 additions and 2 deletions

View File

@ -452,8 +452,13 @@ bool InputEventKey::is_match(const Ref<InputEvent> &p_event, bool p_exact_match)
return false; return false;
} }
return keycode == key->keycode && if (keycode == 0) {
(!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask()); 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() { void InputEventKey::_bind_methods() {