[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: Xproto.h
Hi!
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).
Display *dpy;
KeySym *sym, *temp;
KeyCode firstkeycode;
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.
3. XKeysymToString(*temp);
- Gives the name (or character) corresponding to the keysym 'temp'.
Thanks.
- Karthika
_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com