How to determine the state of the CTRL key without a keyboard event?

Lubos Lunak l.lunak at suse.cz
Tue Apr 15 17:49:12 BST 2003


On Tuesday 15 of April 2003 17:37, Mirko Boehm wrote:
> Hi everbody,
>
> I stumbled on a weird thing I could not solvw on my own so far:
>
> How do I find out the state of the CTRL key (or any other modifier key)
> when there is no other key pressed and no keyboard event released?
> Consider mouse movements

 Mouse events include the modifiers status too.

> or what I am thinking about: combining the
> modifier keys with (in this case Sony) laptop specific function keys or
> the jog dial that are not reported as keyboard events.

 XQueryPointer() returns the modifier mask too, but you should prefer getting 
them together with the event you're reacting upon (because X11 is 
asynchronous and blah blah blah you could possibly run in some trouble 
otherwise - that's why mouse events include the state too).

>
> Where do I look for it?


-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/





More information about the kde-core-devel mailing list