gtkmm on screen keyboard (using xorg), everything ok but the direction arrows

I'm writing a simple open source gtkmm "on screen keyboard"
( , on README there are instruction for compiling)
which makes use of XOrg libraries.
I understand this question is more related to xorg than gtkmm but I asked to xorg mailing list
and had no reply, maybe someone knows a bit of xorg and can give me a little help.

While all characters and modifiers work pretty good, I'm struggling from several days with the direction arrows
but am absolutely stuck and clueless.

For all characters and modifiers it works simply with something like:

        XSync(mp_display, 0);
        if(flags & FLAG_KEY_DOWN)
            XTestFakeKeyEvent(mp_display, XKeysymToKeycode(mp_display, keysym), 1 , 0);
        if(flags & FLAG_KEY_UP)
            XTestFakeKeyEvent(mp_display, XKeysymToKeycode(mp_display, keysym), 0, 0);

but I really found no way to have the direction arrows working.

The result is that sending the XK_Up and XK_Down arrow doesn't produce visible effect, the XK_Left
and XK_Right instead sometimes produce a double movement and sometimes (after messing with XK_Up
and XK_Down button clicks) produce a single movement in the right direction plus a movement up or down.

note that the keysyms are defined in a xorg header but have the same values of the ones
defined in the GDK defines and we usually deal with when catching key presses in gtkmm.

If anybody can give me even a simple clue/link that would be of great help.
Thanks in advance.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]