You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description:
Action match gives the wrong result, it completely ignores modifiers.
Originated from #9002, and @volzhs seemed to notice this same issue about a year later.
Steps to reproduce:
Set up an input action called "test" and give it an event of Alt+Shift+Enter.
In a script, create and InputEventKey with scancode/keycode = KEY_ENTER.
Print the result of InputMap.event_is_action(event, "test")
Note that the result is TRUE. It is comparing KEY_ENTER and SHIFT+ALT+KEY_ENTER. This should NOT return true!
Note this also totally messes with InputMap::_find_event(), which is relied upon for InputMap::action_add_event, InputMap::action_has_event andInputMap::action_erase_event
Godot version:
4.0 master
3.2.3 stable
OS/device including version:
Win 10
Issue description:
Action match gives the wrong result, it completely ignores modifiers.
Originated from #9002, and @volzhs seemed to notice this same issue about a year later.
Steps to reproduce:
Set up an input action called "test" and give it an event of Alt+Shift+Enter.
In a script, create and InputEventKey with scancode/keycode = KEY_ENTER.
Print the result of InputMap.event_is_action(event, "test")
Note that the result is TRUE. It is comparing KEY_ENTER and SHIFT+ALT+KEY_ENTER. This should NOT return true!
Problem lines:
godot/core/input/input_event.cpp
Lines 386 to 396 in a84ad91
The actual problem is
(!key->is_pressed() || (code & event_code) == code);
Minimal reproduction project:
For 3.2
InputEventActionMatch.zip
The text was updated successfully, but these errors were encountered: