How to handle right mouse button events for UMG buttons?

UMG buttons has only left mouse button events.

But i also need right mouse button events, for example for Pop-Up Menu activation.

How to add and handle right mouse click event for UMG button?

please help, thx.


I guess you can use the predefined OnHovered-event for a button.
Then make a boolean for “isRightMouseButtonDown” somewhere, preferably in Player Controller.

Then you draw some Blueprint:

  1. OnHoverd-event
  2. Branch with isRightMouseButtonDown
  3. If true
  4. Execute whatever you want to perform

OnMouseButtonDown => MouseEvent => IsMouseButtonDown => RightMouseButton

that doesnt work unfortunately :frowning: it returns with false, despite pressed right button (though the event triggered correctly)

seems we should use GetEffectingButton instead of IsMouseButtonDown, that works properly.