-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Modifier + Key] action is fired when pressing Key without modifier #34502
Labels
Comments
Still present in 3.2.1 |
Changing condition to this works, but don't know if it would break stuff.
|
Lunatoid
added a commit
to Lunatoid/godot
that referenced
this issue
Jan 20, 2021
Should fix godotengine#34502, now it checks if the keycode matches and seperately if the modifiers also match. Let's say we have an action that is bound to CTRL+"A" This means that holding CTRL and then pressing and releasing "A" will now appropiately fire the events. One thing to note is that pressing CTRL+"A" and then releasing CTRL while still holding "A" does not fire the release event.
This is still reproducible in 4.0 RC 1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry if this should be a duplicate. Its not that easy finding anything in 5000+ open issues tho.
Godot version:
3.1.2
OS/device including version:
Manjaro with kernel 5.4.2
Issue description:
When creating an action with a modifier key
event.is_action_released()
returnstrue
when only pressing the key without the modifier.There are a lot of issues with the opposite problem, but i didn't found one about this way around.
As seen in the relevant code (https://github.com/godotengine/godot/blob/3.1/core/os/input_event.cpp#L312):
modifiers are simply ignored when the key isn't pressed (key released).
Steps to reproduce:
Create action with an modifier. Ctrl+A for example.
In an
_unhandled_input
function do:and press "A".
The text was updated successfully, but these errors were encountered: