UMG Widget treats Keyboard and Gamepad 1 as the same player, even when "Skip Assigning Gamepad to Player 1" is checked

In UE4.15 I am unable to separate Keyboard from Gamepad 1 within UMG elements.

Example:
[Setup] Initialize all available Player Controllers, with the minimum being: Keyboard = Player Controller 0 (PC0), Gamepad1 = Player Controller 1 (PC1).

[Scenario A]: Create and add a widget with at least one focus-able object to viewport. Use “Set User Focus” blueprint element, targeted at the focus-able object and PC0 (Keyboard). Observe that navigation can be performed with PC0 as well as PC1 (Gamepad1), despite Gamepad 1 being its own Player Controller.

[Scenario B]: Create and add a widget with at least one focus-able object to viewport. Use “Set User Focus” blueprint element, targeted at the focus-able object and PC1 (Gamepad1). Observe that navigation cannot be performed with PC1. Note however that if another controller had been plugged-in and initialized, as PC2, it would be able to navigate.

This has been infinitely frustrating for me to work around, as everything else within my project works. I am able to initialize all player controllers and load a join-in screen for local multiplayer. As long as I handle all UMG input from my Player Controller Blueprint it’s fine, but as soon as I attempt to use the built-in UMG focus system it lumps Keyboard+Gamepad1 as a single player.

After completing join-in my players are able to enter game without issue. Keyboard being completely separate from Gamepad1.

edit: The more I play around, the more issues I find related to this option. Force feedback goes to the wrong controller when this is enabled as well. Issue here: https://answers.unrealengine.com/questions/483846/force-feedback-doesnt-play-on-given-controller.html

I ended up creating my own UMG focus method to work around this issue, but I have yet to find a work around for rumble.

Same problem here with the 4.16.3 version of the engine. Is there an update about this issues in the newer version of the engine?

I know that this is a pretty old question, but I’m curious what you did to resolve the issue. I’m having the same problem in 4.18.3 and it’s a serious issue to the project’s development.

I have the same problem with 4.24:

  • Gamepad with ID 1 is sharing focus with keyboard instead of controlling focus separately.

  • Gamepad with ID 2 controls the focus that should be controlled by Gamepad with ID 1.

  • It looks like “Skip Assigning Gamepad to Player 1” is not taken into account when it comes to widget navigation.

EDIT: Problem is still there with 4.25.1

1 Like

You can do it in c++, check this out: wiki.unrealengine.com

I still have the same issue in 4.26.2.
I really hope this will be fixed soon. Otherwise I see no way of creating two player multiplayer with one person on keyboard&mouse and an other person on the controller, when there is only one controller.
This problem already took a lot of time as i tried to work around it. But without any luck so far … very frustrating -.-

My only solution for now is to keep the “Skip Assigning Gamepad to Player 1” unchecked.

Thank you very much! Looks very promising (aside from the formatting being broken)
But the InputKey(...) function seems to be deprecated and cannot be overridden because it is declared as final.

I tried to override the new InputKey(const FInputKeyEventArgs& EventArgs) function, but I’m unable to change EventArgs.ControllerId

bool UMyGameViewportClient::InputKey(const FInputKeyEventArgs& args) {
if (args.IsGamepad()) {
FInputKeyEventArgs newArgs = FInputKeyEventArgs(args.Viewport, args.ControllerId + 1, args.Key, args.Event);
return Super::InputKey(newArgs);
}
else {
return Super::InputKey(args);
}
}
I think i got the script working. But sadly, the widget control problem is not fixed with this …
Behaviour/bug seems to be exactly the same as with the “Skip Assigning Gamepad to Player 1” setting.