Subject: Root Key Press

From: [email-masked]
Date: Fri, 20 Sep 2002 23:32:16 -0700

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.

-- 
  _
 ( \      _  \    /_ /  _ _  Jason Weber                  (503) 380-7424
  \|(\/)()))  \/\/(-/_)(-/(  Infinite Monkeys Inc.        Aloha, Oregon
  //                         http://www.imonk.com/baboon  [email-masked]
 (/     [email-masked]        [email-masked]

     "Canister contains at least 50% recycled material; 15%
      post-consumer content."
   -- Pringles Fat-Free (side of can)
--
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-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Sep 2002 11:22:09 +0200

> 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-masked], 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-masked].
To report problems, send mail to [email-masked]