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. 參考


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM