diff --git a/debian/changelog b/debian/changelog index 6c1ca7e..fa15776 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +g15daemon (1.9.5.3-8.1) unstable; urgency=low + + * Non-maintainer upload. + * Send a sync event after key up/down (closes: #567213). + + -- Julien Cristau Sun, 25 Jul 2010 11:39:22 +0200 + g15daemon (1.9.5.3-8) unstable; urgency=low * Put the third argument (modes) on open with O_CREAT (Closes: #559649) diff --git a/plugins/g15_plugin_uinput.c b/plugins/g15_plugin_uinput.c index 216381d..2f29ccd 100644 --- a/plugins/g15_plugin_uinput.c +++ b/plugins/g15_plugin_uinput.c @@ -125,6 +125,13 @@ static void g15_uinput_keydown(unsigned char code) event.value = G15KEY_DOWN; write (uinp_fd, &event, sizeof(event)); + + memset(&event, 0, sizeof(event)); + + event.type = EV_SYN; + event.code = SYN_REPORT; + + write (uinp_fd, &event, sizeof(event)); } static void g15_uinput_keyup(unsigned char code) @@ -137,6 +144,13 @@ static void g15_uinput_keyup(unsigned char code) event.value = G15KEY_UP; write (uinp_fd, &event, sizeof(event)); + + memset(&event, 0, sizeof(event)); + + event.type = EV_SYN; + event.code = SYN_REPORT; + + write (uinp_fd, &event, sizeof(event)); } void (*keyup)(unsigned char code) = &g15_uinput_keyup;