Hello, > 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 221 = keycode 222 = XF86PowerOff keycode 223 = XF86Standby keycode 224 = keycode 225 = keycode 226 = 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. That the XStringToKeysym knows about them is something buried in the Xlib - the manpage says that this behaviour is implementation dependent. 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" :-) Regards -- Stano -- 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]