I'm trying to make a script that can detect keystrokes in Windows without the Tk window having focus.
I would like the be able to press a key - for instance Page Up - while in a game and have that start off the rest of my script. I have the script completed and working, but I can't get it to detect keystrokes unless I minimise the game and click the Tk window to give it focus. I only just started using Tk a few days ago, so if this is simple I apologise (although I couldn't find anything by searching). It doesn't necessarily have to use Tk to capture the keystrokes.
If anyone could tell me if this is possible I would be very grateful.