1

I want to intercept the raw events from the keyboard (or the mouse, eventually). I tried to use the /dev/input/[...] files, they are very practical and I can read the events of any key even caps lock or Super. But I see that the keyboard input is subject to the key repeat system, and I don't want.

Is this the lowest level of information we can read from the kernel (this means that the key repeat behaviour is implemented in the keyboard??) or does it exists an API with more granularity (that logs as events as possible)? Also, is it possible to read events like this without root privileges ?

  • 1
    I think that's the lowest it gets. Old-style PC keyboards (AT/PS2) implement repeat in hardware. I think USB keyboards do that too. The Linux kernel can also implement repeat in software but there's no interface for that. – Gilles May 9 '15 at 0:26
  • Ok, thanks. That's not very problematic since I can consider that the key is continuously pressed until I get the key release event. – Morgan Touverey Quilling May 9 '15 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.