mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-22 03:10:05 +01:00
Sync the key state on startup
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
parent
09a1f6e427
commit
a36dcecd9e
1 changed files with 4 additions and 0 deletions
|
|
@ -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++)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue