Rebind a key with ALT/CTRL chorded trigger

Hello guys,

I am posting here with great hope as I was unable to find any solution to this, even though this is something quite usual on video games.

While playing, I want to remap an action to a key with a Chorded action trigger. I found where to set that in the IMC (+ Trigger > Chorded Action > Set the desired trigger). But I am completely unable to do it while playing.

For instance, if pressing “S” shoots, I want to be able to bind it to “Alt + S” or “Ctrl + S” while playing.

I am using an Input Key Selector widget which is perfect for that since it captures the triggers and has a Chord structure as an output, however the “Map key” node has a Key structure input, which does not accept Chord structure (see visual example below).

This set-up works perfectly fine for simple key rebinding (from S to K for example) but there is no way I could link the “Shift / Ctrl / Alt” Booleans to the “To key” input from the “Map key” node.

Any help would be greatly appreciated since I’ve been spending hours trying to find a solution online, in vain.

Cheers

I am refreshing the post, anyone please :frowning:

Do you need chorded keys?
for simplicity i just have Alt set a bool on pressed/released
and then have a branch on Shoot for S/Alt-S

or more technically i have a helper function to choose between shift,ctrl, alt and return an enum

Hello Auran and thanks for the reply.

I would indeed prefer to change the chorded keys (if possible) directly in the IMC. I guess a workaround with booleans and branchs could work, but I feel like it’s not really dynamic.

By that, I mean with this solution it requires to add a “If shift key is set as a Trigger” then “If alt key is set as a Trigger then” etc, in front of every single action performed by the character. And from what I understand, that means having 3 variables (shift / alt / ctrl is set as trigger) multiplied by the number of actions the character can do ? That makes so many variables.

Is that the most optimized way to do it with the “enhanced” system ? I have seen this tutorial from Matt Aspland (who is a cool youtuber) : https://www.youtube.com/watch?v=R9JZq3KrodM&t=381s

And it seemed to be sooo much easier before… Surely I am missing something !

nah you just put it in a macro and can reuse it everywhere

but was just an idea, i tried the chorded system but had problems with it, like both events fired S an alt-S so i gave up, maybe its been updated since then

Could you provide a very simple BP example of how you would allow a player to change from S to Alt + S with a key selector widget ? I am new to Unreal, and actually I never used macros before.

I know I am asking for a lot, but I’ve been desperatly looking for a solution for days and you are my only hope right now