key detect

A

Alex Taslab

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!
 
H

hlubenow

Alex said:
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.

H.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top