This is all you would need to do to keep typing Return in Injustice 2 every minute after your Mac has been idle for five minutes. However, if you want it to type Return more frequently (say, every 10 seconds) you could also set up a macro like this and set it to be triggered either manually or after a certain number of idle minutes:
Once this macro has been triggered, it will keep typing Return every 10 seconds (you can of course change the Pause action's duration to adjust this) and stop once you move the mouse, just like canceling the screen saver.
Hopefully this should get you started! Feel free to come back and post again if you have any other questions.
Hey Gabe,
Just saw this email (I’ve been moving houses and it takes a while), and I
would like to say thank you, the second code you made works like a charm.