Arch-Linux

xinput:在外部顯示器上禁用映射觸摸屏

  • October 30, 2020

我在 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)]

這使得觸摸屏幾乎無法使用。如何禁用此功能?

謝謝你的幫助

**PS:**如果您需要更多資訊,請在評論中提問,我會提供。

解決方案是將此程式碼添加到您的~/.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

引用自:https://unix.stackexchange.com/questions/617111