UMG - How to manage properly ActionMapping

Hi,

I have some difficulties to get the right way to handle ActionMapping in my UMG widget.

here is my case:
I want in a multiplayer game to be able to open an “ingame menu” with the “Echap” key and also close it by the same key. The “Echap” key is a Keybinding defined by an ActionMapping.

As of today, the PlayerController handle the menu opening, but if I set input to “UI Only”, the PlayerController can’t handle properly the closing of the menu.
how can I define the ActionMapping “binding” in my widget? Is this something built-in?

Should I set the input management of those binding in the Hud actor and manage from the class to close/hide my menu?

Setting input mode to “Game & UI”, is not a option for me as of today, as I have some game logic action bound in the PlayerController that I can’t move to the pawn.
I’m in a Multiplayer Game, so I can’t “Pause” the game.

While it seems to be a basic case, I can’t find a easy way to manage it and even in the Answer Hub people have the same issue but no real solution.

thanks for your feedback on how you manage to solve this case.

Ok, I may have found something in 4.10 that will do the job:
ListenForInputAction this is a BP callable function that will create an input component on your UserWidget and add it in the PC input Stack. I bet this is the way now to handle this case. I will do some test and validate this approach in case someelse have the same case to solve.

it’s a 4.11 change. We have to wait. :stuck_out_tongue:

it was miss tag as in 4.10 due a error in GitHub.