In UE4, i couldn’t create keyboard events or input actions. And in UE5 it is now possible.
BUT, After assigning some code to these keys/input actions IN WIDGET, they’re triggering even AFTER REMOVING widget.
How can i disable input consumption after widget removal?
If the widget is removed, i.e. removed from parent, it won’t consume input. So I’d double check and confirm that it is getting removed in the way that you think it is.
@BIGTIMEMASTER It will still consume input. E.g. create a widget inside the PlayerController. Promote it to variable. Have an AnyKey event with a PrintString. Remove the widget from parent, press AnyKey
Look at this example. You will have to disable ConsumeInput for your InputAction. And if you do this, the widget will stay, because you use the same key for both events. It will always be like “Destroy, Create again” when you press it. WidgetInput.zip (826.1 KB)
Oh, i’m dumb. The whole time, i was using “right mouse button” for testing. Apparently this is causing the problems with focusing on widget inside editor.
Long story short: Use Collect Garbage and uncheck Consume Input in widgets.
And make sure your widget isn’t referenced anywhere, else garbage collection won’t happen.