Skip to content
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

Actions are triggered on modifier press / release #571

Open
benfrankel opened this issue Aug 4, 2024 · 3 comments
Open

Actions are triggered on modifier press / release #571

benfrankel opened this issue Aug 4, 2024 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@benfrankel
Copy link
Contributor

benfrankel commented Aug 4, 2024

Version

0.14

Operating system & version

Arch Linux v6.9.9-arch1-1

What you did

I have A mapped to action 1 via insert, and Shift + A mapped to action 2 via insert_modified. In my game, I press and hold A, then press and release Shift.

In the following, "triggered" implies action_just_pressed == true.

What you expected to happen

Action 1 gets triggered (on A press).

What actually happened

Action 1 gets triggered (on A press), then action 2 (on Shift press), then action 1 (on Shift release).

@benfrankel benfrankel added the bug Something isn't working label Aug 4, 2024
@benfrankel benfrankel changed the title Modifier press and release trigger actions Actions are triggered on modifier press / release Aug 4, 2024
@alice-i-cecile
Copy link
Contributor

I almost always check for just_pressed in my action-handling code to avoid this. I don't think that this is surprising / fixable / a bug if you're calling .pressed. Is that what you're doing here, or does it occur with just_pressed?

@benfrankel
Copy link
Contributor Author

benfrankel commented Aug 4, 2024

This occurs with action_just_pressed, yeah.

@alice-i-cecile
Copy link
Contributor

Great, I'll take a look :)

@alice-i-cecile alice-i-cecile modified the milestones: 0.15.1, 0.15.2 Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants