Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Grabbing keyboard in X11

by Hue-Bond (Priest)
on Jun 23, 2008 at 12:21 UTC ( [id://693506]=note: print w/replies, xml ) Need Help??


in reply to Re: Grabbing keyboard in X11
in thread Grabbing keyboard in X11

Thanks for your reply. Unfortunately, a Perl module around XEvIE doesn't seem to exist yet, so I'm stuck with X11::Protocol. On the other hand, I've taken a look into the source code of icewm and I've seen that it uses XGrabKey to grab the key combinations it uses. Something like:

$x->GrabKey (52, 'AnyModifier', $x->root, 0, 'Asynchronous', 'Asynchronous');

(52 being the keycode for the letter 'z').

The only obstacle I have to overcome is how to translate 'z' to 52 (in this example) but I think X11::Keyboard's KeysymToKeycode will fit this purpose nicely.

--
David Serrano

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://693506]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-24 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found