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

Mirko Boehm mirko at hackerbuero.org
Tue Apr 15 20:53:51 BST 2003


<quote who="Lubos Lunak">
...
>  Mouse events include the modifiers status too.
OK, good.
>
>> 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).
This is the problem - the "events" are in fact input from a socket,
basically bytes you receive. Now I would like to be able to bind
CTRL+JogDialDown to a function. This is why I do not get an X event.

Maybe XQueryPointer is a solution, I will check it.

Thanks,
--Mirko.







More information about the kde-core-devel mailing list