ArchLinux 触控板配置

ArchLinux 触摸板配置

安装软件包

  1. 触摸板支持:yay -s xf86-input-libinput

基本配置

  1. 添加到用户组:sudo gpasswd -a $USER input
  2. 添加点击功能:
  • 查找Touchpad 的id,简称tid:xinput list
  • 查找libinput Tapping Enabled的设备编号,简称lnum:xinput list-props device ,device为Touchpad的id
  • 开启单击功能:xinput set-prop tid lnum 1 ,将tid与lnum换成你自己的
  1. 简单配置触摸板
  • /etc/X11/xorg.conf.d/40-libinput.conf 属性解释
属性 含义
"Tapping" 开启单击发送事件
TappingButtonMap lmr,单指左键,双指右键,三指中键
DisableWhileTyping 打字不检测鼠标事件
TappingDrag 点击托拽
  • 基本配置文件
Section "InputClass"
        Identifier "touchpad"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        Option "Tapping" "on"
        Option "ButtonMapping" "1 3 0 4 5 6 7"
        Option "TappingButtonMap" "lmr"
        Option "DisableWhileTyping" "on"
        Option "TappingDrag" "on"
EndSection

进阶配置(手势)

  1. 手势支持:yay -s libinput-gestures
    • 映射工具:xdotool
  2. 配置手势
  • copy 配置文件:sudo cp /etc/libinput-gestures.conf ~/.config/libinput-gestures.conf
  • 更改文件权限(将li 改成自己用户名字,echo $USER 查看)sudo chmod li:users ~/.cofig/libinput-gestures.conf
  1. 调试
  • 使用libinput debug-events 监控touchpad事件libinput debug-events --device Device Node (Device Node根据libinput list-props 上文的lnum号查)
  • 使用libinput debug-gui 监控touchpad事件libinput debug-gui --device Device Node
  1. 参考
原文地址:https://www.cnblogs.com/luckyCoder/p/12732525.html