[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
A closer look at the X lib manual and some juggling with the functions provided what I was looking for.
The member "u.u.detail" of struct _xEvent (line 1000 in Xproto.h) is the keycode for KeyPress & KeyRelease events, while for ButtonPress & ButtonRelease events, it is the number of the mouse button (1 to 5).
KeySym *sym, *temp;
int min, max, num, count;
1. XDisplayKeycodes(dpy, &min,&max);
- Gives the range of valid keycodes.
2. sym = XGetKeyboardMapping(dpy, firstkeycode, count, &num);
- Returns a list of keysyms for the given range of keycodes.
- Gives the name (or character) corresponding to the keysym 'temp'.
Chat with your friends as soon as they come online. Get Rediff Bol at