Sorry. I was a bit too fast on my last reply.

No - This gnome "mouse pointer locate code" does not
work for my issue!

If this option is set in gnome no application will get the
KeyPress event for  Control_L or Control_R anymore !
(Which is not a big problem because Control is a modifier
and the state is set in the KeyPress event of other keys)

Try it with xev :)

When I do a XAllowEvents(.. ReplayKeyboard ..)
in my KeyPress handler  other apps will get the KeyPress events
but  my application will never get a KeyRelease event afterwards
for the grabbed key :(

any ideas ??

> On Tue, 2003-10-21 at 07:56, Peter Bergmann wrote:
> 
> > Can anyone tell me how to query the real state of a specific key
> > (Pressed/Released?) with xlib ?
> > Does xkb offer functions for this issue?
> 
> XKB allows you to switch to "detectable auto-repeat" mode, where you
> get Press/Press/Press/Release rather than 
> Press/Release Press/Release Press/Release.
> 
> You can emulate this on servers without XKB by looking at the timestamps
> for the events. (You can look at the GTK+ sources in gtk+/gdk/x11 /
> to see both how it uses XKB and how it emulates when XKB is missing)
> 
> With that, you should be able to come to something pretty close
> to what you want; reference here is the "locate pointer" code in
> the GNOME control center 
> (gnome-control-center/gnome-settings-daemon/gnome-settings-mouse.c)
> 
> That shows how to use XGrabKey and XAllowEvents to trap a press/release
> of a key without intervening key presses, while otherwise letting
> through the key events to applications.
> 
> Regards,
>                                               Owen
> 
> 
> _______________________________________________
> Devel mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/devel
> 

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to