hlubenow2 at gmx.net
Thu Apr 26 20:17:47 CEST 2007
Alex Taslab wrote:
> Hi everybody, does anyone know how to detect a key press from a
> keyboard. Well I do know how to do that, but i need to detect just one
> press and ignore the others. I mean, my program checks an input from the
> outside (a sensor) and i emulate that signal as a keypress, but the
> sensor doesn`t send the signal as a unique pulse y just keeps sending
> signal during some seconds, so that is like to be pressing one key for a
> period of time. How can i take that first press of a key and ignore the
> others? I am using pygtk. thanks everybody!
Perhaps you could emulate the sensor-signal as something else than a
keypress, perhaps pipe the event-data into some temporary file or so.
More information about the Python-list