summaryrefslogtreecommitdiff
path: root/misc/g15daemon/g15daemon-1.9.5.3-uinput.patch
diff options
context:
space:
mode:
Diffstat (limited to 'misc/g15daemon/g15daemon-1.9.5.3-uinput.patch')
-rw-r--r--misc/g15daemon/g15daemon-1.9.5.3-uinput.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/misc/g15daemon/g15daemon-1.9.5.3-uinput.patch b/misc/g15daemon/g15daemon-1.9.5.3-uinput.patch
new file mode 100644
index 0000000000..f91843281c
--- /dev/null
+++ b/misc/g15daemon/g15daemon-1.9.5.3-uinput.patch
@@ -0,0 +1,35 @@
+Index: g15daemon-1.9.5.3/g15daemon/g15_plugin_uinput.c
+===================================================================
+--- g15daemon-1.9.5.3/plugins/g15_plugin_uinput.c
++++ g15daemon-1.9.5.3/plugins/g15_plugin_uinput.c
+@@ -125,6 +125,14 @@
+ event.value = G15KEY_DOWN;
+
+ write (uinp_fd, &event, sizeof(event));
++
++ /* Need to write sync event */
++ memset(&event, 0, sizeof(event));
++ event.type = EV_SYN;
++ event.code = SYN_REPORT;
++ event.value = 0;
++ write(uinp_fd, &event, sizeof(event));
++
+ }
+
+ static void g15_uinput_keyup(unsigned char code)
+@@ -137,6 +145,14 @@
+ event.value = G15KEY_UP;
+
+ write (uinp_fd, &event, sizeof(event));
++
++ /* Need to write sync event */
++ memset(&event, 0, sizeof(event));
++ event.type = EV_SYN;
++ event.code = SYN_REPORT;
++ event.value = 0;
++ write(uinp_fd, &event, sizeof(event));
++
+ }
+
+ void (*keyup)(unsigned char code) = &g15_uinput_keyup;
+