You may have a look here Real time control of a Voron 2.4 using a gamepad especially koconnor’s answer.
Good luck, hcet14