Issues with rebinding keys with Enhanced Inputs

DefuseStudios
Wed, 26 Oct 2022 14:35:14 +0000
Blueprint

Hey guys,

I’m having some trouble trying to rebind keys with the new Enhanced Inputs system. It just seams to be missing key settings. I’m trying to rebind a key to an action by using Unmap Key to remove the old mapping and then Map Key to map the new mapping to the action.

The problem I’m having is when using Map Key node its missing important key input settings, like the Is Player Mappable, Player Mappable Key Options, Triggers, Modifiers etc. The weird things is the Map Key node then returns a KeyMapping struct that contains all this info but its just blank. Which means I lose my Display Name for the input as well as modifiers for the new input.

I’ve also tried the Add Player Mapped Key node which does work better as it allows you to replace a key input instead of having to remove one and adding a new one. But it doesn’t save to the context, so as soon as you restart the game the controls will revert back to their previous settings. Is there a way to save these new mapped key inputs?

EDIT: So I’ve found that even when using the Map Key node with the Mapping Context object after restarting the engine the Mapping Context blueprint will revert to the previous key input mappings. So I have no idea how your meant to implement a rebind key system that saves the new key inputs.

Any suggestions would be amazing, thanks guys

7 posts - 5 participants