[PATCH libevdev 1/7] Sync the key state on startup
Peter Hutterer
peter.hutterer at who-t.net
Tue Aug 13 17:50:48 PDT 2013
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
libevdev/libevdev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libevdev/libevdev.c b/libevdev/libevdev.c
index 0d315ec..0641b97 100644
--- a/libevdev/libevdev.c
+++ b/libevdev/libevdev.c
@@ -232,6 +232,10 @@ libevdev_set_fd(struct libevdev* dev, int fd)
if (rc < 0)
goto out;
+ rc = ioctl(fd, EVIOCGKEY(sizeof(dev->key_values)), dev->key_values);
+ if (rc < 0)
+ goto out;
+
/* rep is a special case, always set it to 1 for both values if EV_REP is set */
if (bit_is_set(dev->bits, EV_REP)) {
for (i = 0; i < REP_CNT; i++)
--
1.8.2.1
More information about the Input-tools
mailing list