On Fri, Sep 20, 2002 at 11:32:16PM -0700, [EMAIL PROTECTED] wrote:
> I'm laying out a new module and having a little trouble with XEvents.
> This might be a purely X issue.
> 
> I want to catch a key press anywhere on the screen, like the Alt key.
> It doesn't have to be exclusive.  In fact, I want the fvwm core to
> read the keys too and act as usual.
> 
> I tried XSelectInput(dpy,rootWindow,KeyPressMask|KeyReleaseMask),
> but I never get any events.  In fact, for the several masks I've tried,
> the only one that did anything was PointerMotionMask.  This tells
> me my approach is not entirely broken.
> 
> If I can get this to work, I'm not sure I'll get the event
> if the mouse is over a non-root window, but that's the next step.
> 
> I can't think of another module that even reads the keyboard,
> much less reading keys when not on a window created by the module.

You want to use the XGrabKey() function, not just XSelectInput().
Unfortunately the result *is* exclusive.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, mail: [EMAIL PROTECTED], phone: 0721/91374-382
Schlund + Partner AG, Erbprinzenstr. 4-12, D-76133 Karlsruhe
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to