Add support for HID reports in libinput record
The output says it all. Unfortunately it's not something we can enable by default since we may leak passwords that way. But having everything in one recording will be useful (once hid-tools is updated to extract the info).
$ sudo ./build/libinput-record --with-hidraw
[...]
- hid:
- hidraw1: [ 17, 0, 20, -8, 0, 0 ]
- evdev:
- [ 0, 16042, 2, 0, 20] # EV_REL / REL_X 20
- [ 0, 16042, 2, 1, -8] # EV_REL / REL_Y -8
- [ 0, 16042, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +8ms
- hid:
- hidraw1: [ 17, 0, 16, -7, 0, 0 ]
- evdev:
- [ 0, 24044, 2, 0, 16] # EV_REL / REL_X 16
- [ 0, 24044, 2, 1, -7] # EV_REL / REL_Y -7
- [ 0, 24044, 0, 0, 0] # ------------ SYN_REPORT (0) ---------- +8ms
This required a bit of restructuring, primarily to change to epoll()
instead of the previous hand-positioned fds.
cc @bentiss