Re: GTK+ 1.2 key press and release events
Ian Thompson-Bell <ian@xxxxxxxxxxxxxxxxxxxxxxx> writes:
> In Xlib, when you press and hold a key you get an initial keypress event,
> followed by more keypress events as the keyboard auto-repeats and when you
> finaly release it you get a keyrelease event.
That's news to me. :-) GTK+-2.0 enables this behavior via the XKB
extension when available, and when not, emulates it by, when it
receives a key press, seeing if there is release pending with
the same timestamp.
> In gtk+ 1.2 when I press and hold a key I get a keypress event immediately
> followed by a key press event. When I release the key there is no
> corresponding keyrelease event..
> How do I get gtk to to behave like Xlib?
Well, if you look at the GTK+-2.0 sources, you can see how it gets
XLib to behave like GTK+.