Questions regarding libevdev

Peter Hutterer peter.hutterer at who-t.net
Wed Mar 20 22:24:38 UTC 2019


On Thu, Mar 21, 2019 at 12:14:25AM +0900, Nayan Deshmukh wrote:
> Hello,
> 
> We have encountered a quirky behavior of libevdev and wanted to make
> sure that it is known and intentional quirk.
> 
> Whenever I set the version for a device through
> `libevdev_set_id_version`, the value set is truncated at 65,535 which
> is the max value of unsigned short. Any thoughts on this?

the id_version sets/gets the struct input_id's version field, from
linux/input.h. That's a uint16 so we mirror the kernel API here.
The same applies to the other libevdev_set_id_* fields, those are 16 bit
only too.

Many drivers don't really use that version field at all, so it's largely
ignored by userspace anyway. Out of interest - what do you need it be bigger
than 16 bits for?

Cheers,
   Peter


More information about the Input-tools mailing list