I have created a pause menu and also added action mappings to the up and down arrow keys as an alternative way to select menu items. The problem is, whenever the pause menu is opened, the arrow keys don’t seem to fire their action mapping event.
But if I click anywhere on the widget they start working. When I open the widget I set the input to Game and UI and the arrow keys are set to fire even when the game is paused. The escape key also has an action binding, but it always works and never acts like it “lost focus” of the keyboard. Does anybody have an idea of what could be wrong?
Thank you for your time,
I had a similar problem. I’m not 100% sure, but it seems like UMG consumes the arrow key input if you have widgets that are keyboard focusable. I disabled keyboard focus for everything and it worked fine for that. You can try mapping your menu controls to other keys to see if it’s just the arrow keys that aren’t firing.
I take a completely different approach to handling input. If I press X or up I want it to go through my controller no matter what and I want my controller to pass that input to an exact location. To do this with widgets I usually set up a BP interface that sends the info directly to the widget. I use what I call my controller state to switch between which events/functions/messages are sent. X on a controller to me can mean several things but should always mean the same thing when a menu is up. Using 1 interface for every menu, and then setting that menu to a var in my controller, and setting my controller state to pass the info along ensures that when I press X, I select the button or when I press right it moves right or left when I press left. In the video it goes opposite but that is my error.
Anyway, that is just my take and one way I ensure my menus function consistently. Here a video covering setting up an entire menu the way I described. https://youtu.be/qrH0aqOMNlo (Might still be uploading)