I have a UMG widget that I put in focus using the “Set Input Mode Game and UI” node. If I click on the window or the window loses and then regains focus then my widget no longer receives any keyboard input. Here’s a repro project I made: project
The steps to repro this are
- Create a Widget blueprint, set Is Focusable to true
- Override OnKeyDown to print a string and return Handled
- Create the widget in your level blueprint, add it to the viewport, set the input mode to Game and UI
- Run the game, press some buttons, see your print message
- Click the window, press some buttons, no message
- Restart, alt+tab away and back, press buttons, no message