Enhanced Input Limitations and Bugs

Hey guys, same “problem” here with some UI. I try to AddMappingContext when I open a widget to add new inputs and remove them when I close it.

Add and Remove MappingContext totally rebuild control mappings. We can check that just by diving into the code of this functions :

void IEnhancedInputSubsystemInterface::AddMappingContext(const UInputMappingContext* MappingContext, int32 Priority)
{
	// Layer mappings on top of existing mappings
	if (MappingContext)
	{
		if (UEnhancedPlayerInput* PlayerInput = GetPlayerInput())
		{
			PlayerInput->AppliedInputContexts.Add(MappingContext, Priority);
			RequestRebuildControlMappings(false);
		}
	}
}

So, when using a “Pressed” trigger on an input, adding a mapping context on Triggered, and holding down the input when playing, the event is invoked infinitely. Would be cool to have a documentation on this behavior, as I spent a lot of time understanding why my pressed input was not working as expected ! And if someone has a workaround, I would take it with pleasure :smiley: