Please add a patch for TriggerHappy.
Date: 28 Feb 2021 18:29:50 +0100
Subject: [PATCH] added support for pure REL/ABS devices (such as rotary encoders)
Some input devices such as rotary encoders don't have keys or switches,
but can generate EV_REL/EV_ABS events.
This simple change allows these devices to be used with triggerhappy.
Developer: https://github.com/trurle
Signed-off-by: Semen Kreyda <aswerklon@gmail.com>
---
devices.c | 1 +
1 file changed, 1 insertions(+)
--- a/devices.c
+++ b/devices.c
@@ -45,6 +45,7 @@
int rc = ioctl(fd, EVIOCGBIT(0,sizeof(bits)), bits);
return rc > 0 && (
/* we only consider devices with keys or switches suitable */
+ test_bit(EV_REL, bits) || test_bit(EV_ABS, bits) ||
test_bit(EV_KEY, bits) || test_bit(EV_SW, bits)
);
}