How to share focus between game and UI?

Hello and goodnight,

I have been trying to develop a system for my game in which the player control the character through the player controller and an UI command window at the same time, but with different keys,like Kingdom Hearts style, however, I am having an issue, that is, I cannot get the keyboard input (through OnKeyDown) if my slate widget doesnt have the input focus, however if i set the input focus to the widget, I then, lose the focus of the game (the character controller), how can I read/bind events to both at the same time?

PS: to set the input mode i have been using:

FInputModeGameAndUI inputMode;
	inputMode.SetWidgetToFocus(widget2);
	GetWorld()->GetFirstPlayerController()->SetInputMode(inputMode);

so there is no way to use the commands of slate and the controller at the same time? *if not, i am going to encapsulate most of my widgets in a class of their own, for managing their implementations and input, there are too many widgets to handle on just a hud or a controller, its going to become a giant mess if i do so…

i usually spawn all widgets from the HUD and keep track of their state in the HUD, and so far it hasn’t made much of a mess, but i don’t have a ton of menus. but even if you have alot of menus, you could let them share a similar interface, where the HUD just calls functions that correspond to each button.

if a menu has more than 3 degrees of freedom, it should probably be redesigned for usability, especially if its a console game or designed for a gamepad. with a PC and mouse, you have more room to make complicated interfaces with many different menus open at the same time, but i always try to keep UI simple, with only 1 menu active, because its less confusing for new players and easier to port to consoles.

Think, widget input and game input as different state. It cannot be called at once.
Whenever your focus is outside the widget, then it will call use the binding that you specified in Game Input (whether in Player Controller or PlayerCharacter). And when your focus is on the widget, you can execute all the key bindings that specified in that particular widget.
Or you can create a function that always return the Focus into the Widget, whenever a key is pressed. Or, you can duplicate all the game key-binding into the widget.