keypressed() function

Gabriel Genellina gagsl-py at yahoo.com.ar
Tue Dec 26 16:06:07 EST 2006


At Tuesday 26/12/2006 10:25, pinkfloydhomer at gmail.com wrote:

>I need a function (blocking or non-blocking) that tells me if a key has
>been pressed (even before it has been released etc.). Also, I would of
>course like to know _which_ key has been pressed.

On Windows you can listen to the messages WM_KEYDOWN/WM_KEYUP.
Or, for a specific key, you can use GetKeyState/GetAsyncKeyState. For 
the whole keyboard use GetKeyboardState.


-- 
Gabriel Genellina
Softlab SRL 


	

	
		
__________________________________________________ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 




More information about the Python-list mailing list