But how do you send the keys to the actual process once it gets the focus ? Or the script just runs in the background arbitrarily pressing keys?
All I do is execute the script (either from the command line or in any other way), switch the focus (I've got SLEEP_BEFORE_START seconds - set to 3 here) to the game (by clicking on its window), and... that's it.
The script acts exactly as if I was pressing the keys. In the current implementation, I can't change the focus while the script executes - this would require some magic with finding certain processes for the banal_click function, I don't know whether the pynput module allows that, and it probably wouldn't be portable (I ran this game on Wine under Linux).
And, by the way - deleting a team member overwrites the last save - so I recommend backing up your saves in this game.