Action Event on Widget

Hi all, is there a way to listen to an enhanced input action event inside a widget (CommonUI)? Simpler than overriding OnKeyDown?

The input should be passed from the controller to the widget:

Listen for your enhanced input event in the controller and fire an event that the widget can bind to.

So I can’t do it in UI only input mode

No, no, you can totally totally get your enhanced input in your UI.

Just place your enhanced input event in the widget. I thought you had already tried that and you wanted to make it in a different way.

mhh, are you sure? Just put the AI event on Widget BP like in the player controller? it doesn’t works to me, I will try with a simpler configuration.

Yea, I’m sure. I’ve tested it just in case.

My setup is really simple based off the third person example project.

  • I the user widget has just a static text to see if it is attached.
  • I connected EnhancedInput_Move event to a print string in it.
  • I attached it to the player view.

I tried with a simpler setup but it works just in “UI & Game” input mode, when I’m on “UI Only” it doesn’t works. I’ve noticed that the documentation note too says that the Input event needs a Game Input mode included

Yea the enhanced input system works by adding and removing contexts, not by limiting your input to an object so if you need the game and the menus input separated make two contexts and switch them around.