如何在Ubuntu 18.04上永久禁用触摸屏


14

我正在尝试在华硕S200E笔记本电脑上禁用触摸屏。在Ubuntu 16.04中,我可以这样做:

Section "InputClass"
    Identifier "evdev touchscreen catchall"
    MatchIsTouchscreen "on"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
EndSection

如何在Ubuntu 18.04上完成此操作?


您可以使用此命令xinput disablexinput --list | grep -i "touch " | sed 's/id=//g' | cut -f2
naib khan

Answers:


16

似乎您是指位于的文件/usr/share/X11/xorg.conf.d。也许libinput驱动程序最近已更新以支持您的触摸屏?

可能您想使用以下内容进行编辑/usr/share/X11/xorg.conf.d/10-evdev.conf

“ InputClass”部分
    标识符“ evdev触摸屏包”
    MatchIsTouchscreen“打开”
    MatchDevicePath“ / dev / input / event *”
    #driver“ evdev”
    选择“忽略”,“关于” 
EndSection

/usr/share/X11/xorg.conf.d/40-libinput.conf带有:

“ InputClass”部分
    标识符“ libinput触摸屏包”
    MatchIsTouchscreen“打开”
    MatchDevicePath“ / dev / input / event *”
    #Driver“ libinput”
    选择“忽略”,“关于” 
EndSection

如果这不起作用,请使用来获取触摸屏的名称xinput,然后将以下命令之一添加到启动脚本中:

xinput set-prop [touchscreen id] "Device Enabled" 0
xinput disable [touchscreen id]
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.