Re: GDK, XEvents, and the caps lock key
- From: Owen Taylor <otaylor redhat com>
- To: Matthew D Allen <s2mdalle titan vcu edu>
- Cc: gtk-list redhat com
- Subject: Re: GDK, XEvents, and the caps lock key
- Date: 27 Oct 1999 10:24:21 -0400
Matthew D Allen <s2mdalle@titan.vcu.edu> writes:
> I'm trying to debug an app written in gtk with gdk and some xlib calls,
> and there are a few items I'd like to bring up.--
>
> First, when you call XChangeKeyboardMapping it is suppoesd to generate a a
> MappingNotify event per the man page. It does happen, and gdk notices it,
> but spits out a message saying "Unknown even window (0)" or something very
> similar. First, i was wondering why this event is unknown to GDK, and
> second, if there was a way with a gdk functoin to attach a callback to
> this type of signal so I can do nothing when it happens or just ignore it
> completely.
The warning message was removed a while ago (in 1.2.4 I think)
> Also there is the issue of the caps lock key. It has a KeySym that maps
> to a !=KeyCode, but it is neither in the modifier list for X with
> XGetModifierMapping (taking the keycodes returned by that, translating to
> KeySym, and looking for XK_Caps_Lock.
> What type of key is caps_lock and
> how can I modify it's function?
I don't quite understand - when I hit Caps_Lock in xev, I get:
keycode 66 (keysym 0xffe5, Caps_Lock)
Similarly, 'xmodmap -pm' displays the caps lock in the map
without a problem.
I haven't tried to use the Xlib functions directly, but I suspect
that the standard X utilities are just calling these functions.
If these utitilies work for you, then probably there is something
that you aren't quite doing right while using the Xlib functions.
> Through XChangeKeyboardMapping() (which I
> have tried and doesn't seem to work) or through XSetModifierMapping()
> (which I haven't looked very deeply into yet) The reason I ask these Xlib
> kinda questions is because I haven't been able to locate any functions
> that would help me out in this area through GTK+.
GTK+ does not export the functions directly to set the keyboard
mapping
- They would be X specific anyways, so there is little point in
wrapping them.
- They aren't very commonly used. (Since they are global to the
display, it would be bad if a lot of programs started changing
them)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]