I have an old USB RF remote that I'd like to use with Kodi. The remote is a non-keyboard input device which generates keycodes. I'd like to do some remapping, but I haven't done that since the days of /usr/lib/keymap, which has been retired in favour of evtest and udev's hwdb files.
An HWDB rule (for my purpose) consists of a hardware identifying header, and then bunch of key mappings. I've found several examples of doing this for a keyboard, but none for my non-keyboard input device, and none that explain how to construct the hwdb header.
Generally speaking, how do I construct the hwdb header? Here's the output of
udevadm info /dev/input/eventX.
P: /devices/pci0000:00/0000:00:02.0/usb2/2-1/2-1:1.0/rc/rc0/input8/event4 N: input/event4 S: input/by-id/usb-X10_Wireless_Technology_Inc_USB_Transceiver-event-if00 S: input/by-path/pci-0000:00:02.0-usb-0:1:1.0-event E: BACKSPACE=guess E: DEVLINKS=/dev/input/by-path/pci-0000:00:02.0-usb-0:1:1.0-event /dev/input/by-id/usb-X10_Wireless_Technology_Inc_USB_Transceiver-event-if00 E: DEVNAME=/dev/input/event4 E: DEVPATH=/devices/pci0000:00/0000:00:02.0/usb2/2-1/2-1:1.0/rc/rc0/input8/event4 E: ID_BUS=usb E: ID_INPUT=1 E: ID_INPUT_KEY=1 E: ID_MODEL=USB_Transceiver E: ID_MODEL_ENC=USB\x20Transceiver E: ID_MODEL_ID=0002 E: ID_PATH=pci-0000:00:02.0-usb-0:1:1.0 E: ID_PATH_TAG=pci-0000_00_02_0-usb-0_1_1_0 E: ID_REVISION=0100 E: ID_SERIAL=X10_Wireless_Technology_Inc_USB_Transceiver E: ID_TYPE=generic E: ID_USB_DRIVER=ati_remote E: ID_USB_INTERFACES=:ff0000: E: ID_USB_INTERFACE_NUM=00 E: ID_VENDOR=X10_Wireless_Technology_Inc E: ID_VENDOR_ENC=X10\x20Wireless\x20Technology\x20Inc E: ID_VENDOR_ID=0bc7 E: MAJOR=13 E: MINOR=68 E: SUBSYSTEM=input E: USEC_INITIALIZED=8383075 E: XKBLAYOUT=us E: XKBMODEL=pc105