Keysym to modifiers state
Jim Gettys
jg at freedesktop.org
Tue Nov 1 08:00:18 PST 2005
The man command is your friend: XKeysymToKeycode.
- Jim
On Tue, 2005-11-01 at 17:35 +0200, Cvetelin Andreev wrote:
> Search where? in keysymdef.h?
>
> With XLookupString(some_event) I can convert keycode+modifiers to keysym,
> I want to do the opposite one from keysym to keycode + modifiers so i can
> pass the keycode and the modifiers to XSednEvent
>
> On Tue, 01 Nov 2005 17:24:38 +0200, Jim Gettys <jg at freedesktop.org> wrote:
>
> > You'll have to search for the keysym I suspect...
> > - Jim
> >
> > On Tue, 2005-11-01 at 17:13 +0200, Cvetelin Andreev wrote:
> >> The problem is that I dont have an event. I have only a keysym. I want
> >> to
> >> emulate a key event to specified window.
> >>
> >> On Tue, 01 Nov 2005 17:05:12 +0200, Jim Gettys <jg at freedesktop.org>
> >> wrote:
> >>
> >> > No, you get the modifiers state from the event itself. All keypress
> >> > events include this information.
> >> > - Jim
> >> >
> >> >
> >> > On Tue, 2005-11-01 at 14:51 +0200, Cvetelin Andreev 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?
> >> >>
> >> >
> >> >
> >>
> >>
> >>
> >
> > _______________________________________________
> > xorg mailing list
> > xorg at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/xorg
> >
>
>
>
More information about the xorg
mailing list