From 848d42636ac1ac075e6c0a44504ac82cf8f6b9fe Mon Sep 17 00:00:00 2001 From: max naumov Date: Sun, 21 Feb 2021 18:07:17 +0000 Subject: [PATCH] added support for pure REL/ABS devices (such as rotary encoders) --- devices.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devices.c b/devices.c index 92c7704..c2ff053 100644 --- a/devices.c +++ b/devices.c @@ -45,7 +45,8 @@ int device_is_suitable(int fd) { int rc = ioctl(fd, EVIOCGBIT(0,sizeof(bits)), bits); return rc > 0 && ( /* we only consider devices with keys or switches suitable */ - test_bit(EV_KEY, bits) || test_bit(EV_SW, bits) + test_bit(EV_KEY, bits) || test_bit(EV_SW, bits) || + test_bit(EV_REL, bits) || test_bit(EV_ABS, bits) ); }