Widget not reading keyboard until clicking window

Hello, I have a strange issue, I made a widget menu for my game. That is shown when first time start the game. Strangely, that is not getting focus until I click the screen with mouse. What should I do to fix it ?

Second I have a widget that removes the widget I saved as variable in player pawn and loads new one. I cant get keys UP-DOWN-LEFT-RIGHT keys captured but other keys. I need to re-click mouse. Again I have no idea for this.

In first image I load the widget in pawn called menupawn. In the second image I handle input. It does not matter if I remove booleans. UP DOWN LEFT RIGHT keys are not captured. But enter-backspace and other keys are captured.

I go back to previous widget like this, not thet bioswidget variable is the widget reference in player-pawn:

Hi gomi

You need to set the appropriate input mode when the game launches so the application knows where to focus hardware input.

Take a look at the following nodes:

It is best to set these nodes from the player controller or HUD classes.

Hope this helps

Alex

Thank you for the answer, I used input mode game only in controller and in also set it in switched widgets now that works.

This solution is not working because every time when you click on Widget the game is going back to UI only mode and again keyboard is gonna disable and not working until we set it again to game mode somehow or left mouse click on some free area and really annoying since you have to use this node after every action in UI buttons or even sliders and every click on UI , This is a bug ( When the game set on UI and Game Mode it should not change by itself )

2 Likes