I have a program that is listening to a certain event file handle. Is there a file I can read to get details about the specific event’s device that I am listening to?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming that (a) you’re on Linux and (b) you have
sysfsmounted (typically on/sys), you can look at/sys/class/input/eventX. This will be a symlink into the device tree; this should provide you some device details. For example:For USB devices, you could then probably mount a
usbfsfilesystem and check out thedevicesfile for more information.