My unattended application needs to respond to keystrokes, but only when a specific type of keyboard is attached to the system. It will be a numeric keypad, connected via USB.
I already found out how to detect the connection/disconnection of a keyboard, using libusb/libudev. And it seems than capturing keystrokes from any HID device isn't that hard either, although it requires root privileges, which I'd like to avoid...
Difficulty is that I don't want the Linux system to "use" that numeric keyboard in the normal way, i.e. don't accept input from it on the login tty's. I also don't want to disable logins altogether, login should still be possible using a "regular" keyboard. I have no idea how to do this. Any suggestion is appreciated.