自动为可用的多点触控硬件创建输入提供程序配置项(仅限Linux)。

感谢Marc Tardif提供的探测代码,该代码取自scan-for-mt-device。

设备发现由该提供程序完成。然而,输入的读取可以由其他提供程序执行,例如:hidinput、mtdev 和 linuxwacom。mtdev 在其他提供程序之前使用。有关 mtdev 的更多信息,请参阅 mtdev

以下是自动创建的示例:

[input]
# using mtdev
device_%(name)s = probesysfs,provider=mtdev
# using hidinput
device_%(name)s = probesysfs,provider=hidinput
# using mtdev with a match on name
device_%(name)s = probesysfs,provider=mtdev,match=acer

# using hidinput with custom parameters to hidinput (all on one line)
%(name)s = probesysfs,
    provider=hidinput,param=min_pressure=1,param=max_pressure=99

# you can also match your wacom touchscreen
touch = probesysfs,match=E3 Finger,provider=linuxwacom,
    select_all=1,param=mode=touch
# and your wacom pen
pen = probesysfs,match=E3 Pen,provider=linuxwacom,
    select_all=1,param=mode=pen

默认情况下,ProbeSysfs模块会从/sys/class/input设备枚举硬件,并配置具有ABS_MT_POSITION_X能力的硬件。但例如,Wacom屏幕不支持此能力。您可以通过在配置行中添加select_all=1来阻止此行为。添加use_mouse=1以同时包含提供核心指针功能的触摸屏硬件。