Widget key press

How can I make a key press in a widget?
So if I press Q when the widget is open, it will print hello

I did find a answerto my question.

You can use an event dispatcher in your controller blueprint.

I’ve added an action mapping in the project settings. I’ve called this one “test” and have assigned the key “Q”.

Then in the controller blueprint I just create an event dispatcher called “want to print hello”

And this event is binded inside the widget blueprint, on construct:

The input mode must be set to game and UI, so it can be good to set the game paused when you open your widget ( but it depends on the context ). In this case you must check " execute when paused" on the input in the controller:

Hope it can help you

I did that, and it worked

Yep you found the solution while I was making my message…