Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
タッチパッドからストリームを読み取るつもりです。/dev/input/eventX を介して実行できることはわかっていますが、どれがタッチパッドを表し、どれがキーパッドを表しているかを判断するにはどうすればよいですか?ありがとう!
ioctlのエントリで使用します/dev/input。さまざまな機能が散発的に実装されているようですがcode=ioctl(fd, EVIOCGNAME(sizeof(buf)), buf);、少なくとも名前は付けられます。
ioctl
/dev/input
code=ioctl(fd, EVIOCGNAME(sizeof(buf)), buf);
実際、/dev で iotctl を実行できるのは root だけです。/sys/class/input を列挙して名前エントリを取得することをお勧めします。