Apr-02-2021, 10:44 PM
(Apr-02-2021, 09:56 PM)philipbergwerf Wrote: How to use keyboard without being root/sudo?
For this particular module, you cannot. This is listed as a limitation in the docs:
Quote:To avoid depending on X, the Linux parts reads raw device files (/dev/input/input*) but this requires root.
The function itself seems okay (but you should probably profile it to see what the performance is). I'd be more concerned that the check was being run when it wasn't necessary. Maybe add some logging and make sure it's only being called on button presses and not other times.