Enhanced Input Limitations and Bugs

Hi, I can confirm the issue of inifinite input triggers when the input is remapped is still occurring in UE 5.1, however, I managed to solve the problem quickly. It’s all about the false assumption that the “Ignore all Pressed Keys until Release” flag’s default value is true, but in fact you have to explicitly tell Unreal that you want it to be true.

Say for example that you have two input actions: IA_OpenInventory and IA_CloseInventory, both mapped on key I, on the Pressed Trigger type.
When IA_OpenInventory is triggered, you remove the current input mapping (IMC_Default) and add the new input mapping (IMC_Inventory). When IA_CloseInventory is triggered, you remove IMC_Inventory and add IMC_Default.

To prevent infinite close and open of your inventory, you need to make sure that the flag “Ignore all Pressed Keys until Release” on the RemoveMappingContext and AddMappingContext functions is explicitly set to true, for example by splitting the Options struct like in the image below. Leaving the default Options parameter probably leads to the creation of a struct with that flag set to false.

6 Likes