Setting keyboard focus for a single screen in local splitscreen.

I currently have a splitscreen game setup in which one player is on mouse/keyboard and the other is on controller. I want to make a widget that allows an interacting player to navigate through a menu with either the mouse or the controller while allowing the other player to continue controlling the game as normal. Is there a way to do this in blueprints? When I use set keyboard focus, both players lose control of the game.

1 Like

Hello @Killerbanaple how are you?

In order to provide you with a proper answer, could you share your setup for split screen and controllers assignment, as well as your current widgets?

That way I will be able to reproduce your isuee and solve it based on your setup!

I’ll be waiting for your answer!

1 Like

This isn’t possible with a single global keyboard focus. In local splitscreen, keyboard and mouse input are shared, so setting keyboard focus affects all local players. The correct approach is to use separate input modes per PlayerController. Set the interacting player to UI Only or Game and UI and route widget input through that PlayerController, while keeping the other PlayerController in Game Only. For controllers, enable focus navigation per widget and avoid Set Keyboard Focus; instead, create and add the widget from the specific PlayerController that should control it.

1 Like

Hello @Killerbanaple it’s me again!

I’ve been tinkering a lot with this idea and I came to the conclussion that the best approach for this is to implement Common UI to handle it. It will alow you to identify the controllers properly without hindering the other player’s movement.

Without using it, I wasn’t able to make the menu work properly, so I highly recomend you to watch this full tutorial on how to implement common UI and use it for your game!

Hope this helps you! Let me know if you have any doubts!

1 Like

Thank you so much! I’ll have to take a look at these next time I am at my computer!