Closed bentiss closed 2 months ago
tbh, I don't think this is a good idea. it makes the output (which we'd usually use to human-debug) a bit harder to read due to the _i8
suffixes which are superfluous.
And the usages are harder to read too:
# 0x05, 0x0c, // UsagePage_Consumer 56
# 0x0a, 0xc0, 0x02, // Usage_Con_ExtendedKeyboardAttributesCollection 58
If we want others to understand the hid-recorder output I think we should go for simplicity and ease of understanding.
It will also require us to make the normal output stable, which is a giant no-no in my opinion. Because in the end you want that output parsed into something else (even if it's just sed) so we can never change this.
I think this needs to go to where the final output is required, i.e. udev-hid-bpf.
Closing this one, as said above: I think this needs to go to where the final output is required, i.e. udev-hid-bpf.
The idea is to make use of https://gitlab.freedesktop.org/libevdev/udev-hid-bpf/-/blob/main/src/bpf/hid_report_helpers.h The description doesn't lose much of its value from a human perspective but can now be parsed by a C compiler if we include that file from above.
It's probably not perfect, but it seems to give correct results for the device I tested it with.
A second pair of eyes would be appreciated :)
Marking as draft because we need https://github.com/hidutils/hut/pull/9 merged first and Cargo.toml amended