xorg下插入鼠标时禁用触摸板

平时插上鼠标工作,有时候打字会摸到触摸板,造成误触。

直接上代码 在/etc/X11/xorg.conf.d/新建11-touchpad-disable.conf

Section "InputClass"
    Identifier "touchpad"
    Driver "libinput"
    MatchIsTouchpad "on"
    Option "SendEventsMode" "disabled-on-external-mouse"
EndSection

后续restart DM就行了。