How to inject/simulate mouse clicks?

For anybody that wants a blueprint hacky way in UE 4.22. you could check every tick for which “Is Input Key Down” and then test against a bool if the button is hovered over when the interact button is pressed. In order to get that Up and Down Action only once, use “Do Once” and reset each after the opposite is complete.

This doesn’t inject or simulate a mouse click so much as it allows you to get the gamepad input within a Widget blueprint and interact with things only on hover.

The second image is the same code, but as a macro and includes the option to execute if the key is held/pressed.

1 Like