XStringToKeysym(), XKeysymToString(), XKeycodeToKeysym(), XKeysymToKeycode() - convert keysyms
KeySym XStringToKeysym (char *string)
char *XKeysymToString (KeySym keysym)
KeySym XKeycodeToKeysym (Display *display, KeyCode keycode,
int index)
KeyCode XKeysymToKeycode (Display *display, KeySym keysym)
Standard KeySym names are obtained from <X11/keysymdef.h> by removing the XK_ prefix from each name. KeySyms that are not part of the Xlib standard can also be obtained with this function. Note that the set of KeySyms that are available in this manner and the mechanisms by which Xlib obtains them is implementation dependent.
If the keysym name is not in the Host Portable Character Encoding the result is implementation dependent. If the specified string does not match a valid KeySym, XStringToKeysym(3) returns NoSymbol.
The returned string is in a static area and must not be modified. The returned string is in the Host Portable Character Encoding. If the specified KeySym is not defined, XKeysymToString(3) returns NULL.
The XKeycodeToKeysym(3) function uses internal Xlib tables and returns the KeySym defined for the specified KeyCode and the element of the KeyCode vector. If no symbol is defined, XKeycodeToKeysym(3) returns NoSymbol.
If the specified KeySym is not defined for any KeyCode, XKeysymToKeycode(3) returns zero.
Xlib