How do I use a gamepad to simulate a computer mouse?

Hey everyone!

So, I’m working on making my game gamepad compatible, and I wanna know if there’s a way to use a joystick on a gamepad to move the cursor, and a button on the gamepad to trigger mouse events. I’m not sure if this is a thing or not, but I would love to know.

Thanks!

Did you ever figure this out?
I am able to move the mouse with

but I can’t for the life of me figure out how to simulate a mouse click with a game pad button