'telegraphy' as a means of data entry

Peter Hansen peter at engcorp.com
Sat Sep 11 22:26:29 EDT 2004


Elaine Jackson wrote:

> I need to record the respective times of the events in a sequence of
> presses/releases of a particular key on the computer keyboard. The key in
> question should also make a sound when depressed (perhaps a forlorn sigh - tee
> hee). On the face of it, it seems like it should be fairly straightforward to
> achieve this with a suitable combination of ingredients from Tkinter, time and
> winsound. 

Does this have to work regardless of what else is going on on
the computer, or is it okay if it works only when the window
for this particular application is active?  (In other words,
it's easy to do if the keypresses go only to this program,
but if you want to capture *all* keypresses at all times,
you can't do it, AFAIK, using just a GUI toolkit like wxPython
or Tkinter... you have to use an OS hook of some kind.)

-Peter



More information about the Python-list mailing list