How do I detect Keystrokes
I am trying to break out of a loop once the SPACE key is pressed. I was using GetKey but it doesn't let the loop continue until it is executed.
from getkey import getkey, keys
key = getkey() #code does not continue until a key is pressed
if key == keys.SPACE:
That's because you're calling
break will always escape the loop. Instead, I think you're looking for