Key snooper / piano keyboard



I'm having a problem with the key snooper. It appears to generate events
coresponding to how they would be entered e.g. in a text box, rather than
the actual keyboard status.

The program is intended to turn your computer keyboard into a piano. When
you push a key, a note sounds, when you lift up, it stops.

One of the key-getting modules uses GTK. I am getting the key events using
the key snooper.

The only problem is, the keycodes still appear to be "cooked": If you hold
down a key, you get repeating events. Immediately after the key is
pressed, a GDK_KEY_PRESS is recieved, then immediately followed by a
GDK_KEY_RELEASE. Then after the key repeat delay, pairs of GDK_KEY_PRESS
and GDK_KEY_RELEASE events are recieved at the key repeat frequency.

Obviously this is not what I want. Is there a way to get the actual status
of the key on the keyboard?

I've searched all the documentation I could find, to no avail.

Thanks,

Ian Turner

P.S. I'm not on the list, so if you could CC me in a reply, I'd be much
obliged.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]