Unfortunately, I haven't received my zBitx yet, but as I cen see from the schematic diagram: , the key (J3) is connected to pins GPIO7 (PTT) and GPIO21 (R-DASH).
Both those pins are interrupt capable (correct me if I'm wrong). The libgpiod offers a possibility where the thread sleeps waiting for the change of the state of a set of interrupt capable GPIOs. Can't that be used to improve the latency instead of periodic polling?
In the worst case, the handling of the interrupt of selected pins can be implemented in the kernel space.
(A few years ago I had to write a few kernel drivers that connected to the GPIO subsystem in linux (e.g. or ). They were not used for low-latency handling interrupts, but that's possible as well.)
?
73,
Wojtek SP5DAA