UMG change "onPressed" gamepad mapping?

Hey guys, I’m trying to figure out a very rare case scenario. I need the “pressed button” function on a Widget Button to be mapped to a different button on a gamepad (for some a reason, a certain console decided it was a great idea to swap A and B…)

Regardless of what my Project-Input Settings are, or however many times I try to catch inputs anywhere else in my game, for some reason I cannot set or override the mapping connected to the built in function “onPressed”. It’s like the most protected sacred friggin command, clearly they want it to always be “gamepad face button bottom”.

I can control selecting with ANY OTHER button from my gameplay blueprint, but I cannot override that one, the only way is to setInput to Game only, not UI, which then means I can’t naviage those menus.

Does anyone know of any possible way to change this? or Override it?

I must admit i don’t understand what you want at all.

A widget button has nothing to do with the “onPressed” event of a gamepad button. An “onPressed” event from a gamepad is absolute. You can link that to an input action or directly catch the event from a blueprint like for example the level blueprint. You can put whatever logic you want behind that. It also doesn’t make sense to switch the actual mappings, why would you do that. Let’s say you switch up and down on a gamepad, it would just be hell of a confusing. Rather put your “move up” function on the “onPressed” event of the directional pad down button.

I’m pretty sure you could switch the mappings with C++ or by editing the UE4 source, but i still don’t get why.

Fronzelneekburm, I think you misunderstood the question.

maxxburman is talking about the OnPressed event of a Button Widget. When the button is “Focusable” and has focus, pressing Gamepad Face Button Bottom will call the event. Similarly, pressing and releasing will call OnClicked. There are lots of good reasons to remap this action, including the fact that Switch and PS4 (in some regions) have the “affirmative” button on the right.

I found this thread because I’m having the same issue (among many others) with UMG’s limited gamepad . :frowning:

1 Like

Hi there, four years later it looks like this remains an issue.

Apparently the gamepad button that triggers the OnPressed event (on a focused button) seems to be hard-coded to be the bottom gamepad button (“A” on an Xbox gamepad).

Is it possible to remap this button somehow? Maybe an option/setting I missed…?

It seems like there is something buried in Lyra that will do it. I have been mucking around with it and was getting the ‘A’ button doing the OnPressed until I added the default Lyra UI to my ‘experience’.
After that the button triggered events that I had bound instead of the default. I haven’t dug into it to see how/why their setup works, but it might be somewhere to start

1 Like

You’re right, thanks! The Lyra project indeed does things completely differently from a “normal” project: They use the new CommonUI plugin, which allows for better rebinding of gamepad/mouse UI interactions.

I’ll try and use that!

(More information here: CommonUI Getting Started Guide - Docs - Unreal Engine Forums)