I have encountered strange behaviour, when trying to add Chorded Actions in the Enhanced Input framework.
When I add the single chorded action and one regular (non-chorded) action based on the same key, everything works fine. For example I can add one action under the ‘period’ key and another one under the ‘Ctrl’ + ‘period’ key combination. That works fine.
But when I try to add another chorded action under the same key - let’s say to have one action under ‘Ctrl’ + ‘period’ and another under ‘Alt’ + ‘period’ - it stops working correctly. The action, which is added as the second one, reacts not only to its ‘proper’ combination (for example ‘Alt’ + ‘period’), but also to the plane key (in this case the ‘period’ key).
Does anyone have any ideas what I am doing wrong and what should I do to repair this?
In my case the crucial thing to understand was the difference between the ‘Triggered’ and ‘Started’ Input Events. The first is generated when the Input Action was indeed triggered, while the second is generated while the evaluation of the Input Action was started.
For example: if you have an Input Action bound to ‘Ctrl+1’ (chorded action) and another chorded Input Action bound to ‘Alt+1’, when you press ‘Alt+1’ key, both those actions will send the ‘Started’ event, but only the second of them will be really ‘Triggered’ (the first will be probably ‘Canceled’ after a while).
So as long as you do not use chorded actions there is no real difference between the ‘Started’ and ‘Triggered’ events, but if you have two or more chorded actions which use the same main key, the difference becomes visible.