I am trying very hard to find the documentation for the uinput
but the only thing I have found was the linux/uinput.h
. I have also found some tutorials on the internet but no documentation at all!
For example I would like to know what UI_SET_MSCBIT
does but I can't find anything about it.
How does people know how to use uinput
?
Well, it takes some investigation effort for such subtle things. From
drivers/input/misc/uinput.c
and include/uapi/linux/uinput.h
files you can see bits for UI_SET_*
definitions, like this:
MSC
REL
LED
etc.
Run next command in kernel sources directory:
$ git grep --all-match -e 'MSC' -e 'REL' -e 'LED' -- Documentation/*
or use regular grep
, if your kernel doesn't have .git
directory:
$ grep -rl MSC Documentation/* | xargs grep -l REL | xargs grep -l LED
You'll get this file: Documentation/input/event-codes.txt, from which you can see:
EV_MSC
: Used to describe miscellaneous input data that do not fit into other types.
EV_MSC
events are used for input and output events that do not fall under other categories.A few
EV_MSC
codes have special meaning:
MSC_TIMESTAMP
: Used to report the number of microseconds since the last reset. This event should be coded as anuint32
value, which is allowed to wrap around with no special consequence. It is assumed that the time difference between two consecutive events is reliable on a reasonable time scale (hours). A reset to zero can happen, in which case the time since the last event is unknown. If the device does not provide this information, the driver must not provide it to user space.
I'm afraid this is the best you can find out there for UI_SET_MSCBIT
out there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With