Quite simply, by using multiple InputAction
’s. For example you can create two actions:
IA_Jump
IA_JumpController
Inside your InputContextMapping
you can assign different keys here. The action events are exposed to Blueprints so I don’t see why you couldn’t implement whatever you’re trying to do. It’s difficult to suggest the most elegant approach when you haven’t given any context in what you’re trying to do.
There is also opportunity to create multiple IMC
’s and assign when there’s a hardware change, there’s an OnInputDeviceConnectionChange
delegate to detect this. You will want to make sure you check which controller for any logic on this.
In 5.3 we now have UEnhancedInputUserSettings
which supersedes the depreciated PlayerMappableInputConfig
. You can extend this class to put any logic inside, and assign in project settings.
I would take some time in playing with the above classes as there are better methods than the expensive checks on tick/input change examples given above.