Gamepad With Minecraft 1.5.2

Question:
How do I make this work with an Xbox controller? (or any gamepad)
Repl link:
https://replit.com/@mjkobylins/BURRITOCRAFT