How to force an action trigger exactly to its binding?

Hello, sorry if this was already answered, couldn’t find any info.

Lets say we have an action defined with CTRL+1 binding.
Currently if you press CTRL+SHIFT+1 input system will still trigger the action.

How to force it to execut the action only when exactly the binding is pressed, in our example CTRL+1?

Thanks.

Do a check to see if Shift is NOT pressed.

Personally I would simply define the action once, let’s call it “GroupSelect”.

If the GroupSelect event occurs, I’d then check if Shift is pressed. If so, I’d copy the selection to the alternate group, otherwise it goes into the main group. It’s really a single operation that simply changes behaviour based on a toggle key like Alt or Shift. If it’s doing something completely different it shouldn’t occupy the same keystrokes.

Thank you for answering.

In this simple example, of course, I would check for extra SHIFT key, etc. But, lets suppose that user can rebind actions, how would I check it then? It could be any combination, CTRL, SHIFT, ALT, COMMAND, etc.

Something like Ctrl+Key and Ctrl+Shift+Key should be closely related functionality. Thus I would not allow the user to rebind these actions separately but rather always use “Shift” as the toggle key.

When the user rebinds to Ctrl+Shift+Key this would either not be allowed, or it would make the previous alternate Shift function the one without Shift. You could also even let the user select the toggle key, if they prefer Ctrl+Alt+Key over Shift for instance.

And generally speaking, games requiring such complex keystrokes are pretty damn rare. Every key combo constitutes “hidden knowledge” that is only used by expert users. Which begs the question if any of these bindings are truly necessary or whether they could be UI-only, or whether these could be non-rebindable.

I don’t believe this functionality is provided built in.

For a keyboard you can probably check if any other keys are pressed at the same time. Don’t imagine this is super performant however.

Agree for a game, in our case it’s an application.

We’ve ended with something similar, checking the keyboard for now.

Thanks.

PS: An answer from @unity whould be great though.