Hi,<br>I'm writing a simple open source gtk(mm) "on screen keyboard" (<a href="http://code.google.com/p/giuspen-x-osk/source/checkout">http://code.google.com/p/giuspen-x-osk/source/checkout</a>)<br>and, while all characters and modifiers work pretty good, I'm struggling from several days with the direction arrows<br>
but am absolutely stuck and clueless.<br><br>For all characters and modifiers it works simply with something like:<br><br> XSync(mp_display, 0);<br> if(flags & FLAG_KEY_DOWN)<br> {<br> XTestFakeKeyEvent(mp_display, XKeysymToKeycode(mp_display, keysym), 1 , 0);<br>
XFlush(mp_display);<br> }<br> if(flags & FLAG_KEY_UP)<br> {<br> XTestFakeKeyEvent(mp_display, XKeysymToKeycode(mp_display, keysym), 0, 0);<br> XFlush(mp_display);<br>
}<br><br>but I really found no way to have the direction arrows working.<br><br>The result is that sending the XK_Up and XK_Down arrow doesn't produce visible effect, the XK_Left<br>and XK_Right instead sometimes produce a double movement and sometimes (after messing with XK_Up<br>
and XK_Down button clicks) produce a single movement in the right direction plus a movement up or down.<br><br>If anybody can give me even a simple clue/link that would be of great help.<br>Thanks in advance.<br>Giuseppe.<br>
<br>