Automating GTA 5 cheat codes with Hammerspoon
I sometimes play GTA 5 on my iMac using PXPlay. For mission-heavy or fighting games, I actually do better sitting close to a screen than sitting ten feet away from a TV. Since an iMac cannot really be used as an HDMI display, Remote Play is the easiest way for me to do that.
I also decided I should probably finish GTA 5 before buying GTA 6. I still haven't finished it.
One thing I hated was entering cheat codes. They're these long button combinations, which I usually print out on a sheet of paper, but I'm too slow at putting them in.
So I used Hammerspoon to automate them.
I mapped short keyboard commands like Control + Option + A to full controller input sequences. If I need armour or another cheat quickly, I can trigger it with one shortcut instead of doing the whole combination, which is really useful in a pinch.
I also love that AI agents exist and I can just give the agent screenshots showing which PXPlay keys mapped to which PlayStation buttons and just have it generate a config file for all the cheats.
None of this was impossible before AI. I just probably would not have spent the time figuring it out for something this small. Laziness happens.