summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-25 21:06:42 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-25 21:06:42 +0200
commit462d933becfd66d09ff62ec4369440bd5c486248 (patch)
treeff6268695ec9d129682f1d4dd7f5269c8ffa1707
parent5d11638277383d5fbccca2c8929894720bf86eb1 (diff)
Implements quick & dirty fix for the EV_KEY.
-rw-r--r--src/relabsd_device.c42
1 files changed, 37 insertions, 5 deletions
diff --git a/src/relabsd_device.c b/src/relabsd_device.c
index d62ff28..f974e97 100644
--- a/src/relabsd_device.c
+++ b/src/relabsd_device.c
@@ -241,13 +241,27 @@ int relabsd_device_write_evdev_event
*/
if (libevdev_uinput_write_event(dev->uidev, type, code, value) == 0)
{
+ /* FIXME:
+ * Why does activating the timeout trigger the EV_KEYS event to not be
+ * followed by EV_SYN?
+ */
+ if (type == EV_KEY)
+ {
+ libevdev_uinput_write_event
+ (
+ dev->uidev,
+ EV_SYN,
+ SYN_REPORT,
+ 0
+ );
+ }
+
return 0;
}
return -1;
}
-
void relabsd_device_set_axes_to_zero
(
const struct relabsd_device * const dev,
@@ -255,6 +269,16 @@ void relabsd_device_set_axes_to_zero
)
{
int i;
+// libevdev_uinput_write_event
+ relabsd_device_write_evdev_event
+ (
+// dev->uidev,
+ dev,
+ EV_SYN,
+ SYN_REPORT,
+ 0
+ );
+
for (i = 0; i < RELABSD_VALID_AXES_COUNT; ++i)
{
@@ -267,12 +291,20 @@ void relabsd_device_set_axes_to_zero
relabsd_axis_to_abs((enum relabsd_axis) i),
0
);
+
+ /*
+ * Also send a SYN event when the axes have been modified.
+ */
+
}
}
- /*
- * Also send a SYN event when the axes have been modified.
- */
- libevdev_uinput_write_event(dev->uidev, EV_SYN, SYN_REPORT, 0);
+ libevdev_uinput_write_event
+ (
+ dev->uidev,
+ EV_SYN,
+ SYN_REPORT,
+ 0
+ );
}