With some usb barcode scanners, repeated characters do not appear in the freerdp session.
It looks like this is because the KeyRelease signal is not sent for the first character.
Removing this if check fixes the problem.
KeySym keysym;
char str[256];
- if (XPending(xfc->display))
- {
- ZeroMemory(&nextEvent, sizeof(nextEvent));
- XPeekEvent(xfc->display, &nextEvent);
-
- if (nextEvent.type == KeyPress)
- {
- if (nextEvent.xkey.keycode == event->xkey.keycode)
- return TRUE;
- }
- }
-
XLookupString((XKeyEvent*) event, str, sizeof(str), &keysym, NULL);
xf_keyboard_key_release(xfc, event->xkey.keycode, keysym);
return TRUE;