[Wine] Re: How to call an internal wine function ?

Alex wineforum-user at winehq.org
Sun Jan 31 15:50:41 CST 2010


Well, I am still learning but what I understood is that when you press the key of keycode 12 (as xev says) with

noting -> "
shift -> 3
lock -> "
? -> 3
mod4 ie AltGr -> #
? -> (sterling)

So we're expecting to find the keysym 0x0023 from the keycode 12 with the 'mod4' pressed.

If you compile this sample :

Code:
#include <X11/Xlib.h>
#include <X11/keysymdef.h>

int main()
{
        int i;
        KeySym keysym;
        Display *display = XOpenDisplay(NULL);

        if (!display)
        { printf("err\n"); return 10; }

        for( i=0; i<9; i++)
        {
                keysym = XKeycodeToKeysym(display,12,i);
                printf("%d_%lX_\n", i, keysym);
        }

        XCloseDisplay(display);

        return 0;
}




you should get 

Code:
gcc test.c -lX11 && ./a.out
0_22_
1_33_
2_22_
3_33_
4_FE55_
5_0_
6_FE55_
7_0_
8_33_




but indeed, there is no 0x0023.

I tried with 1000 instead of 9 but the following lines are '0'.

Please note that I have never used any XLib function before, so maybe I'm misunderstanding what I'm doing.







More information about the wine-users mailing list