Keysym to modifiers state

Cvetelin Andreev cvetelin.a at komero.net
Wed Nov 2 05:20:04 PST 2005


Tell me where to find some help for my problem please.

On Tue, 01 Nov 2005 14:51:10 +0200, Cvetelin Andreev  
<cvetelin.a at komero.net> wrote:

> Hi all,
>
> After a week researching did not find some answers.
>
> I want to send a KeyEvent with XSendEvent with specified keysym. But the
> KeyEvent structure requres keycode (which is system dependant) and
> modifiers. I can obtain the keycode from the keysym with  
> KKeysymToKeycode,
> but what about modifiers?
> A solution is to get the keycode, and to test this keycode with all
> modifiers masks for equality with the original keysym with
> XKeycodeToKeysym (or ewith constructing event with each modifiers
> combination and test it with XLookupString). However the combinations of
> modifiers are large number.
>
> So is there a way to get the modifiers state from the keysym?
>



-- 
Cvetelin Andreev



More information about the xorg mailing list