You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
InputEvent: Restore old behaviour for matching key events to actions.
Original code in 9100db7
This commit is contained in:
@@ -282,7 +282,10 @@ bool InputEventKey::action_match(const Ref<InputEvent> &p_event) const {
|
|||||||
if (key.is_null())
|
if (key.is_null())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return get_scancode_with_modifiers() == key->get_scancode_with_modifiers();
|
uint32_t code = get_scancode_with_modifiers();
|
||||||
|
uint32_t event_code = key->get_scancode_with_modifiers();
|
||||||
|
|
||||||
|
return get_scancode() == key->get_scancode() && (!key->is_pressed() || (code & event_code) == code);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputEventKey::_bind_methods() {
|
void InputEventKey::_bind_methods() {
|
||||||
|
|||||||
Reference in New Issue
Block a user