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

multi-key bindings apply just_pressed retroactively #6

Open
PhaestusFox opened this issue Jun 2, 2021 · 0 comments
Open

multi-key bindings apply just_pressed retroactively #6

PhaestusFox opened this issue Jun 2, 2021 · 0 comments

Comments

@PhaestusFox
Copy link

at the moment pressing ctrl -> enter is the same as enter -> ctrl this wouldn't be a problem except when you have something happen on ctrl + enter and something different on just enter. what gets triggered and the order is different depending on the order things are pressed;
for example, having something bound to LCtrl + Return and Return will

  • on Return+ -> LCtrl+ -> Return- -> LCtrl- = runs Return -> LCtrl + Return
  • on LCtrl+ -> Return+ -> Return- -> LCtrl- = runs LCtrl + Return
  • on LCtrl+ -> Return+ -> LCtrl- -> Return- = runs LCtrl + Return -> Return
  • on Return+ -> LCtrl+ -> LCtrl- -> Return- = runs Return -> LCtrl + Return -> Return

this is not what it should do.

I don't know the best way to fix this but one way would be to have a "final" key that actual check all the other keys are pressed on the frame it gets set to just_pressed so the order of all the other keys don't matter just the last one
and if you wanted something like LCtrl + A + B to trigger regardless of if you pressed A or B last you would just need to bind it twice this only adds N key bindings to any combination of N keys because you only need one binding for each final key not every permutation of said keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant