xinput:禁用在外部显示器上映射触摸屏

xinput:禁用在外部显示器上映射触摸屏

我在我的 Lenovo x390 YOGA 上使用带有 i3wm 的 Arch linux。我还有两个外接显示器。我将它们连接到我的扩展坞并使用 Arandr 进行配置。屏幕效果很好。

但每次我连接到外部显示器时,我的光标在水平轴上的灵敏度都会增加三倍。我的笔记本电脑的触摸屏分为三部分,并在每个屏幕上映射显示器。

有输出xinput --list

⎡ Virtual core pointer                            id=2  [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                  id=4  [slave  pointer  (2)]
⎜   ↳ Wacom Pen and multitouch sensor Finger      id=12 [slave  pointer  (2)]
⎜   ↳ Wacom Pen and multitouch sensor Pen stylus  id=13 [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                  id=17 [slave  pointer  (2)]
⎜   ↳ TPPS/2 Elan TrackPoint                      id=18 [slave  pointer  (2)]
⎜   ↳ Wacom Pen and multitouch sensor Pen eraser  id=22 [slave  pointer  (2)]
⎜   ↳ DP-2                                        id=9  [slave  pointer  (2)]
⎜   ↳ Generic ThinkPad Dock USB Audio Control     id=20 [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)]
    ↳ Sleep Button                                id=8  [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C             id=14 [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated I             id=15 [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard                id=16 [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                      id=19 [slave  keyboard (3)]
    ↳ DP-2                                        id=10 [slave  keyboard (3)]
    ↳ Generic ThinkPad Dock USB Audio             id=11 [slave  keyboard (3)]
    ↳ Generic ThinkPad Dock USB Audio Control     id=21 [slave  keyboard (3)]

这使得触摸屏几乎无法使用。如何禁用此功能?

谢谢你的帮助

附:如果您需要更多信息,请在评论中询问,我会提供。

答案1

解决方案是将此代码添加到您的~/.config/i3/config

# Map input devices only to embedded screen
exec --no-startup-id xinput --map-to-output 13 eDP1     #Wacom finger
exec --no-startup-id xinput --map-to-output 12 eDP1     #Wacom pen
exec --no-startup-id xinput --map-to-output 22 eDP1     #Wacom pen eraser
exec --no-startup-id xinput --map-to-output 17 eDP1     #Touchpad
exec --no-startup-id xinput --map-to-output 18 eDP1     #Trackpoint

相关内容