Jun-04-2024, 08:56 PM
I like the idea of using pygame since I'm doing my dev on a local windows machine but eventually this script will be deployed to a linux server accessible only via SSH.
https://www.geeksforgeeks.org/how-to-get...in-pygame/
So the best method with pygame would be to use pygame to detect keyboard inputs, and if it detects "x" then "enter" it terminates the script, correct? That method would work on both a remote linux server which I SSH'd into, as well as my local machine?
On my local windows machine, I'm running the python script in powershell. Am I correct I'm assuming that pygame will only detect the input when the powershell is in the foreground? I don't want to be in another application doing stuff and then pygame by happenstance detects the input and then shuts down the script...
https://www.geeksforgeeks.org/how-to-get...in-pygame/
So the best method with pygame would be to use pygame to detect keyboard inputs, and if it detects "x" then "enter" it terminates the script, correct? That method would work on both a remote linux server which I SSH'd into, as well as my local machine?
On my local windows machine, I'm running the python script in powershell. Am I correct I'm assuming that pygame will only detect the input when the powershell is in the foreground? I don't want to be in another application doing stuff and then pygame by happenstance detects the input and then shuts down the script...