|
Hi!
If you press two keys, you get two keyDown events. If you release them simultaneously, you get only the second keyUp event.
I suspect the following code in sqUnixX11.c (line 3745 ff.) :
case KeyRelease:
noteEventState(evt->xkey);
{
KeySym symbolic;
int keyCode, ucs4;
if (XPending(stDisplay))
{
XEvent evt2;
XPeekEvent(stDisplay, &evt2);
if ((evt2.type == KeyPress) && (evt2.xkey.keycode == evt->xkey.keycode) && ((evt2.xkey.time - evt->xkey.time < 2)))
break;
}
keyCode= x2sqKey(&evt->xkey, &symbolic);
ucs4= xkeysym2ucs4(symbolic);
if ((keyCode >= 0) || (ucs4 > 0))
recordKeyboardEvent(keyCode, EventKeyUp, modifierState, ucs4);
}
break;
There is that "XPending" check, which seems to swallow events. Looks like hack. Not sure. There is no comment. :)
In our case, we hit both Arrow-Down and Arrow-Right, get two keyDown-events, then release both, and get only keyUp for ArrowRight.
Who knows the CogVM unix sources? :)
Best,
Marcel
|