Answer the question
In order to leave comments, you need to log in
Python loses keypress event as soon as another one is pressed, how to avoid?
Hi all.
I am writing a small script. Should catch the spacebar, and not lose it if they hit the clave.
def get_space_state():
hllDll = ctypes.WinDLL ("User32.dll")
VK_SPACE = 0x20
return hllDll.GetKeyState(VK_SPACE)
while (True):
print get_space_state()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question