Prevent UMG Buttons from taking focus

I’m trying to get keyboard/gamepad input working for the menus in my game but I’ve run into a problem when mixing mouse and keyboard input.

I’ve overridden the OnKeyDown Event in my UMG widget so I intercept the arrow keys and am able to move around but if the user clicks on one of the buttons it takes focus and says it handles the event so my widget never receives it. I’ve found a way around this by adding a call to Set User Focus after every button click but that doesn’t seem like the correct way of going about things. Is there any way of making a button never handle specific events.

After working at it for a bit longer I found the IsFocusable variable on the buttons which tells it whether or not it can take keyboard focus (this is only found in the Designer tab, not the Graph tab where I was looking).

1 Like