Transferring Input To Widgets

We have a scoreboard widget that the player holds tab to open.
When the player releases tab, the scoreboard should close.

Currently we have an input event set up on the player controller.
When tab is pressed, the widget is created, when tab is released the widget gets removed.

This works fine until we have an element in the widget that takes keyboard focus.
When the widget takes focus, the event fires as if the tab key was released.

We tried to solve this by unhooking the ‘released’ event and having the scoreboard widget listen for when the tab key is released.
But this doesn’t work because the element within the widget has focus, so the event doesn’t propagate.

What is the proper way to solve this issue?

you could try calling “Set Input Mode Game Only” prior to creating the widget


Here’s the function I call to exit a menu: