Ehanced Input System AddPlayerMappedKey not working

Hi,

I managed to find what was the issue in my code.
In the SetupInputComponent of my controller, I forgot to register my Mapping Context on the Enhanced Input User Settings.

I was already doing that on the Enhanced Input Local Player Subsystem and I tought this was enough.
EnhancedSusbsytem->AddMappingContext(InputMapping, 0);

But I had to get the Input User Settings from the Subsytem and register again in order to finally have my input in the PlayerMappedKeys.
Here’s the code that I has to add at the end of my SetupInputComponent.

if (UEnhancedInputUserSettings* UserSettings = EnhancedSusbsytem->GetUserSettings())
{
	UserSettings->RegisterInputMappingContext(InputMapping);
}
2 Likes