[Jack]
> > What commands can I use to have the program know a certain key has
> > been pressed while another program is in focus?

[Luke]
> I think Pygame and TKInter have a capture-all-keys function, but this
> might also prevent the keypresses from actually going to the target
> application.

If you need this to work on Windows - take a look at pyHook:

http://www.cs.unc.edu/Research/assist/developer.shtml

As Luke has stated... it's possible to stop the key presses from reaching their
target application. If you do use pyHook, make sure your functions always return
True (this allows the key press to hit it's destination).

HTH,

Bill

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to