我有双显示器设置,都是不同尺寸和不同型号的触摸屏。当我执行命令时得到以下结果:
user@user-hpEnvy:~$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1080, maximum 32767 x 32767
eDP1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 382mm x 215mm
1920x1080 60.0*+ 59.9 40.0
1680x1050 60.0 59.9
1600x1024 60.2
1400x1050 60.0
1280x1024 60.0
1440x900 59.9
1280x960 60.0
1360x768 59.8 60.0
1152x864 60.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
HDMI1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 600mm x 340mm
1920x1080 60.0*+ 50.0 59.9
1680x1050 59.9
1600x900 60.0
1280x1024 60.0
1440x900 59.9
1280x720 60.0 50.0 59.9
1024x768 60.0
800x600 60.3
720x576 50.0
720x480 60.0 59.9
640x480 60.0 59.9
720x400 70.1
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
下一个命令的结果如下:
user@user-hpEnvy:~$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech Unifying Device. Wireless PID:401b id=10 [slave pointer (2)]
⎜ ↳ Logitech Unifying Device. Wireless PID:4016 id=11 [slave pointer (2)]
⎜ ↳ ELAN20E7:00 04F3:20E7 id=13 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Video Bus id=8 [slave keyboard (3)]
↳ Power Button id=9 [slave keyboard (3)]
↳ HP Truevision HD id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
↳ HP Wireless hotkeys id=16 [slave keyboard (3)]
↳ HP WMI hotkeys
这里我有两个显示:电子DP1和HDMI1 另外,有两个触摸设备:ELAN20E7:00 04F3:20E7和SynPS/2 Synaptics 触摸板
现在的问题是,如何识别哪个触摸屏属于哪个显示器?我想识别这个映射以进行进一步的操作。
或者
是否可以列出从主板连接到显示器的所有 USB 设备?
答案1
使用 xinput --map-to-output 命令选项。
尝试这个:
第一个命令将触摸设备“ELAN20E7:00 04F3:20E7”映射到左侧 eDP1 显示器。
第二个命令将触摸板“SynPS/2 Synaptics TouchPad”映射到右侧 HDMI1 显示器
xinput --map-to-output $(xinput list --id-only "ELAN20E7:00 04F3:20E7") eDP1
xinput --map-to-output $(xinput list --id-only "SynPS/2 Synaptics TouchPad") HDMI1
如果您运行这些,您可以知道哪个触摸设备与哪个屏幕搭配。