> > On my system, the XStringToKeysym() function does indeed return
> > the proper keysym value, but then XKeysymToKeycode returns zero.
> > I don't know if it's the same problem on your system.
> 
> No, it isn't - the following program:
> 
> === snip ===
> #include <X11/Xlib.h>
> #include <stdio.h>
> 
> main()
> {
>   Display *d = XOpenDisplay(":0.0");
>   KeySym ks = XStringToKeysym("XF86PowerOff");
>   KeyCode kc = XKeysymToKeycode(d, ks);
> 
>   printf("%x, %d\n", ks, kc);
> 
>   XCloseDisplay(d);
> }
> === snip ===
> 
> produces:
> 1008ff2a, 222
 
> > Try
> > 
> >   $ xmodmap -pke
> > 
> > and check if the KeySym is actually assigned to a keycode.
> 
> Yes it is:
> 
> keycode 222 = XF86PowerOff
> keycode 223 = XF86Standby
> keycode 227 = XF86WakeUp
> 
> > No, that's not the problem.  Fvwm uses the KeySym and KeyCode
> > types defined by the X headers everywhere.
> 
> These symbols are _not_ defined in the X headers.

I mean the data types KyeSym and KeyCode, not the key symbols
themselves.

> That the
> XStringToKeysym knows about them is something buried in the
> Xlib - the manpage says that this behaviour is implementation
> dependent.

Which man page?

> I am also using XKB and not the xmodmap mappings (maybe
> it matters).
> 
> If you cannot reproduce it, I'll try to look into the code
> myself and let you know the result - I just hoped you just
> look and say "Ahh, this is trivial - just do foo" :-)

Sorry to disappoit you ;-)  If you want to debug this, you should
start in the files fvwm/bindings.c and libs/Bindings.c.  There, the
original binding command is processed (starting with Cmd_Key).
If that works fine, the code handling key presses is in
fvwm/events.c, HandleKeyPress().

Bye

Dominik ^_^ ^_^

P.S.: I can't reply to the list at the moment.  Please forward this
mail to [EMAIL PROTECTED]  Also, please sent replies to that
list, not to the address I'm writing this from. This is not my usual
mail addres but only a temporary solution.  Finally, I'm on a holiday
for two weeks from saturday, so don't expect any quick replies
from me ;-)

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to