Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5164

Device Tree • Re: Can a rotary encoder generate keyboard events?

$
0
0
Thank you for pointing me at that thread, as I can see that I've answered this question already:
It's important to remember that overlays don't really add functionality, they just enable functionality that is already present (but perhaps unused) in the kernel. The rotary-encoder overlay makes use of the rotary_encoder module, while the gpio-key overlay uses the (can you guess?) gpio_key module. If the rotary-encoder module could generate key presses then I would hope that could be configured and enabled using an overlay, but it appears that is not the case.

And in a way, I'm not surprised - the Linux philosophy for drivers and utilities amounts to "do one thing and do it well", so it is preferable to have something to transform any kind of relative input (e.g. from a mouse or rotary encoder) into key presses, rather than add that feature to all (or just some) of the input drivers.
Let's tackle this problem from the other end - why are scroll events not suitable? Can you not teach your application to handle them?

Statistics: Posted by PhilE — Fri Feb 23, 2024 11:07 am



Viewing all articles
Browse latest Browse all 5164

Trending Articles