[ctypes-users] Press ESC to exit()
Brought to you by:
theller
From: Michael C <mys...@gm...> - 2017-05-01 18:10:26
|
Hi all, I am trying to write a script to exit itself when ESC is pressed. I have found several answers regarding it such as this: http://stackoverflow.com/questions/43709710/push-esc-to-terminate-python-script?noredirect=1#comment74464169_43709710 But those only work when the program goes to that point. Is there a way to write it so that it would run exit() even when the program is in the background? Thanks! |