You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
Fix handling multiple "physical key" events in the single input map action.
This commit is contained in:
@@ -452,9 +452,14 @@ bool InputEventKey::is_match(const Ref<InputEvent> &p_event, bool p_exact_match)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keycode == 0) {
|
||||||
|
return physical_keycode == key->physical_keycode &&
|
||||||
|
(!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask());
|
||||||
|
} else {
|
||||||
return keycode == key->keycode &&
|
return keycode == key->keycode &&
|
||||||
(!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask());
|
(!p_exact_match || get_modifiers_mask() == key->get_modifiers_mask());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void InputEventKey::_bind_methods() {
|
void InputEventKey::_bind_methods() {
|
||||||
ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventKey::set_pressed);
|
ClassDB::bind_method(D_METHOD("set_pressed", "pressed"), &InputEventKey::set_pressed);
|
||||||
|
|||||||
Reference in New Issue
Block a user