Actions with multiple bindings best practice

What are the best practices when it comes to actions where two or more bindings are required to preform the action? Say for example i want to have a save action for a level editor be triggered when the Left CTRL and S key are pressed simultaneously. And to complicate things, both keys trigger other actions when pressed separately.

In a such a scenario do I have to write my own logic to handle this kind of binding or is there functionality built in that I have missed? If not the appeal of Actions is somewhat diluted in my eyes.

On your action asset, you can create a “Button with one modifier”, or two modifier. I think that is what you’re looking for

Hmm, yes I was exploring that functionality, however if I use this option for the example i posted I would also have to have modifiers on the Actions connected to S and Left CTRL keys to make sure they are not triggered when both keys are pressed at the same time? This seems like a hassle if you have multiple shortcut commands in the application.

Yup, indeed. ATM we don’t have a built-in solution for that. We have it on the list for after 1.0 as part of a wider look on having actions triggered more selectively. Something that solves both the problem here as well as problems such as UI actions preventing gameplay actions bound to the same controls from triggering. In 1.0, this is a notable hole in the action system.

1 Like

Ok, thanks for the info! Good to hear it’s in the works.

Any news ?

Currently I’m checking Keyboard.current.*key.isPressed to avoid this behaviour