简体   繁体   中英

How can I determine touch screen device in a bash script?

I am trying out the eGalax touch screen driver for my touch screen, as an alternative to the evdev/xinput_calibrator combination.

The calibration tool that comes with the eGalax driver, TKCal, takes the device to which the touch screen is connected as a command line argument.

Now I would like to start the calibration tool from a bash script. Is there some smart way to determine the device within the script, instead of hard coding "/dev/hidraw0" as in this example:

TKCal /dev/hidraw0 Cal

I presume that I can't rely on the touch screen landing on hidraw0 every time, can I? If I run my software on a different system, with a mouse and a keyboard and touch screen, I guess I have to handle that the devices can be conneted to different hdrawX devices. Please correct me if I am wrong.

Thank you very much! /Fredrik Israelsson

尝试查看/sys/class/hidraw/hidraw*/device/uevent

开发eGalax驱动器的人告诉他们尝试一个更简单的解决方案:编写一个udev规则,该规则会将触摸屏映射到我选择的设备名称。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM