[12days on it] Please help input keymapping widget

Hello,

I’ve been working for a very long time to improve my key remapping system. I’m trying to make a remapping via blueprint that works like in the actual games. For example, if I want to assign C to Sprint but it is already assigned to Crouch. I want him to delete it from Crouch and assign it to Sprint.

That works pretty well but only in one way. Sprint is on top of Crouch and if I assign C to Sprint it sets Crouch to None and Sprint to C but if I try to set Crouch to C right after that then Sprint and Crouch are assigned to C.

So the problem is that it doesn’t save the key in the input settings and only changes the display of the Input Key Selector. So I would like to see with you the function that allows me to efficiently save the input key present in Edit>Project Settings>Input(Action Mapping, Axis Mapping, …).

I’m using Set Selected Key to set the input key selector

and Remove Action Mapping / Add Action Mapping to save in the input settings.

I would also like to understand what exactly the Set key selected function does. Does it restart an On Key selected of the Input Key Selector? When I put a print string right after On Key selected, it displays it twice. I find this strange.

If you want to see the entire code :
Remapping Action Mapping : Remapping action input posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4
Check Key Used : Check Key Used posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4
Update + save Action Input : Update+Save Action Input posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4