I have a Linux USB-HID device ( Hama MCE ), and I can read its events manually by reading cat /dev/input/event7and cat /dev/input/event8. Whenever I press a key on a device, several bytes become readable using one of the commands above cat. I have the default installation of the 64-bit Ubuntu Jaunty desktop on the computer.
I think I can write a parser to interpret the bytes emitted by the device, or I will use libhid if it is more convenient.
My questions:
- How to prevent text mode virtual consoles from receiving some keystrokes on a device as regular keystrokes? Currently, some device keys result in input, back space, PageUp or numeric keypad numbers.
- Similarly, how can I prevent the X server from receiving events from the keyboard and mouse from this device? I have several USB keyboards and mice connected to a computer. I want the X server to receive events from all of them except this device.
- How to configure that whenever a device connects to a computer, a command
/usr/local/bin/keydumper /dev/input/event7 /dev/input/event8(or one command for each path /dev/) will be launched, and the corresponding lines will be /dev/replaced on the command line?