[systemd-devel] [libudev] Obtaining /dev/input/eventx
Robert Milasan
rmilasan at suse.com
Sun Jan 24 23:15:47 PST 2016
On Sun, 24 Jan 2016 15:23:59 +0100
"Hans-Jacob Enemark" <hjenemark at gmail.com> wrote:
> Is it possible to obtain the /dev/input/eventx path from a given USB
> VID:PID combo or similar info, using libudev?
> If so, how ?
>
Try examples: https://github.com/robertalks/udev-examples
udev_example2.c can help you get what you want by enumerating all USB
or input (probably the second you want) devices and just getting the
device you want based on attributes.
:~> udevadm info /dev/input/event0|egrep 'SUBSYSTEM|DEVNAME'
E: DEVNAME=/dev/input/event0
E: SUBSYSTEM=input
NOTE: not sure how much of the info you can get, but give it a try.
--
Robert Milasan
L3 Support Engineer
SUSE Linux (http://www.suse.com)
email: rmilasan at suse.com
GPG fingerprint: B6FE F4A8 0FA3 3040 3402 6FE7 2F64 167C 1909 6D1A
More information about the systemd-devel
mailing list