Triggerhappy added support for pure REL/ABS devices.
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Please add a patch for TriggerHappy.
Tried pull-request but don't know how to use github.
Developer: https://github.com/trurle
https://github.com/wertarbyte/triggerhappy/pull/31
Wertarbyte does not answer. Last commit by wertarbyte committed on 6 Sep 2016
/packages/utils/triggerhappy/patches/001-add_REL-ABS-devices.patch
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)
);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/utils/triggerhappy/patches/001-add_REL-ABS-devices.patch and compare it with the upstream devices.c context, then inspect how patches are applied when building the OpenWrt package. Done means the package builds with the patch applied and TriggerHappy recognizes pure REL/ABS devices such as rotary encoders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100