Very very (necro tier) late, but I found a great method to make it work and I feel it’s worth sharing since it doesn’t use Event Tick.
(images included as a numbered album, since I’m a new user)
First step is allowing the Widget to be focusable, by:
-
Appending ‘Set Keyboard Focus’ after ‘Add To Viewport’
Image 1 -
Enabling ‘Is Focusable’ in Widget designer
Image 2
Next up is the override of desired function (KeyPressed/Released or any other)
-
Create an Event Dispatcher. Mine closes the pause menu, so I’ll call it appropriately
image 3 -
Drag the dispatcher onto the function and select Call.
image 4 -
In the function use Get Key and a set of Equals (Key) to search for keys you need. Every additional key you wish to include requires an additional pair of Equals (Key) and Branch nodes. Trues must go into the Call dispatcher, where as the final false must skip it to the Return Node. Here’s an example:
image 5
Now the final step is incorporating that into your widget’s main Event Graph.
-
To begin you need to bind an event there to the new dispatcher, so drag the dispatcher and choose Assign.
image 6 -
Plug Event Pre Construct or anything that happens before the dispatcher can be used, like so:
image 7 -
Lastly add any logic for what happens once the event is triggered, from the event created by Assign.