Techyou labs
文章RSS
评论RSS
登录
真正的爱应该超越生命的长度,心灵的宽度,灵魂的深度
搜索
关于作者
文章分类
Default
Linux/Unix
Database
Cloud
Networking
Security
Programming
最新文章
带你重走 TiDB TPS 提升 1000 倍的性能优化之旅
Unicode 中的 BIDI 双向性算法[转]
在linux中设置优先使用ipv4,而不是ipv6
linux下WPS高分辨率下因字体缩放导致字体发虚的问题
ssh-rsa not in pubkeyacceptedalgorithms问题解答及处理办法 Permission denied (publickey)
在 Ubuntu 22.04 中使用 PipeWire 替换 PulseAudio
MYSQL简单监控指标
deepin-wine6-stable下TIM悄悄崩溃问题
openwrt 设置ipv6地址分配
Redis 实战篇:巧用数据类型实现亿级数据统计
最新评论
renothing: 备注:路由器端优先设置ipv4并不影响客户端的ip...
renothing: 二次反向代理跟你应用程序得处理时间有关系吧?尤其是...
二次反向代理性能很差,怎么优化的?: 我也用nginx 做了个二次反向代理,但是并发连3...
hostyep: 交换链接么?目前每天保持30个左右对口IP,每月都...
yzhkpli: error while loading share...
美肤宝: 感谢分享。。。
lq: 嗯 喜欢弄得点单点
按月归档
March 2023
December 2022
November 2022
September 2022
August 2022
March 2022
January 2022
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
February 2021
September 2020
May 2020
September 2019
August 2019
July 2019
June 2019
May 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
April 2018
March 2018
December 2017
October 2017
September 2017
August 2017
April 2017
March 2017
February 2017
August 2016
July 2015
November 2014
September 2014
August 2014
July 2014
June 2014
July 2013
April 2013
September 2012
July 2012
May 2012
April 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
June 2009
May 2009
April 2009
March 2009
February 2009
December 2008
November 2008
September 2008
August 2008
July 2008
June 2008
常用标签
Mysql
nginx
mysql优化
linux
debian
Powered by
Typecho)))
Optimized by
EAimTY
Linux Mint 19/Ubuntu18 多点触摸和手势
August 8, 2019
输入子系统由输入子驱动层(input driver),系统核心层(input core)和事件处理层(Event Handler)三部分组成。一个输入事件,比如滑动触摸屏都是通过input driver -> input core -> event handler -> user space 到达用户空间传给应用程序。 X server默认使用 libinput 驱动(xf86-input-libinput) 处理输入设备,xf86-input-evdev 和相关驱动是后备方案。配置文件是 /usr/share/X11/xorg.conf.d/ 中的`10-evdev.conf`和 `40-libinput.conf` Udev由 systemd 通过 xorg-server提供,会自动检测硬件,使用 evdev 或 libinput 处理设备的输入. ``` Input Devices /dev/input ``` Input Drivers ``` xserver-xorg-input-all 驱动包 xserver-xorg-input-evdev 键盘,触摸屏 xserver-xorg-input-vmmouse 鼠标 xserver-xorg-input-wacom 数位板/触摸板 ``` 其他 ``` xserver-xorg-input-libinput 键盘 xserver-xorg-input-synaptics 触摸板 (即将弃用) xserver-xorg-input-joystick 遥杆 xserver-xorg-input-mtrack 触摸板 (推荐使用) xserver-xorg-input-mutrack 触摸板 (年久失修) xserver-xorg-input-void 空输入设备 xserver-xorg-input-xwiimote Wii设备 xserver-xorg-input-acecad 绘图板 Input Conf /etc/X11/xorg.conf /usr/share/X11/xorg.conf.d/ /usr/share/X11/xkb Input Log /var/log/Xorg.0.log ``` linux下的触摸手势方案挺多,早先的touchegg,后来的libinput-gestures, 以及最近[gebaar-libinput](https://github.com/Coffee2CodeNL/gebaar-libinput "gebaar-libinput")。当然紧跟libinput上有的xf86-input-mtrack配置更简单。 debian系列用户直接安装对应的驱动包即可,当然也可以手动编译安装最新的版本,地址在文末 ``` apt-get install xserver-xorg-input-mtrack ``` `xinput list`查看自己的触控板标识以及支持情况,比如我的 ``` renothing@desktop:~[master]$ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ETPS/2 Elantech Touchpad id=12 [slave pointer (2)] ⎜ ↳ Logitech USB Optical Mouse id=9 [slave pointer (2)] ``` `xinput list 12` ``` Reporting 7 classes: Class originated from: 12. Type: XIButtonClass Buttons supported: 7 Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" Button state: Class originated from: 12. Type: XIValuatorClass Detail for Valuator 0: Label: Rel X Range: -1.000000 - -1.000000 Resolution: 0 units/m Mode: relative Class originated from: 12. Type: XIValuatorClass ... ``` 懒得做说明,直接贴配置文件`/etc/X11/xorg.conf.d/10-mtrack.conf`: ``` Section "InputClass" Identifier "ETPS/2 Elantech Touchpad" MatchIsTouchpad "true" Driver "mtrack" MatchDevicePath "/dev/input/event*" Option "Sensitivity" "1.1" Option "FingerHigh" "5" Option "FingerLow" "5" Option "IgnoreThumb" "true" Option "ThumbRatio" "70" Option "ThumbSize" "25" Option "IgnorePalm" "true" # This ignores tap-to-click, which causes more problems than benefit in my experience Option "TapButton1" "0" Option "TapButton2" "0" Option "TapButton3" "0" # If you want a middle-click, then "ClickFinger2" should be value "2" Option "ClickFinger1" "1" Option "ClickFinger2" "1" Option "ClickFinger3" "3" Option "ButtonMoveEmulate" "true" Option "ButtonIntegrated" "true" Option "ButtonEnable" "true" # "ButtonZonesEnable" means that your trackpad gets divided into three equal sections, where clicking any third of the touchpad sends the click code in "ClickFingerX". Since I didn't want middle-click, the left two thirds of my touchpad are left click, and the right third is right click: Option "ButtonZonesEnable" "false" Option "ClickTime" "25" # Ensures that bottom 5% of touchpad doesn't register taps Option "EdgeBottomSize" "5" Option "SwipeLeftButton" "8" Option "SwipeRightButton" "9" Option "SwipeUpButton" "0" Option "SwipeDownButton" "0" Option "SwipeDistance" "700" # ScrollCoast makes touchpad feel a bit more Mac-like, although it coasts in chunks and isn't relative to speed at which two finger scroll was happening Option "ScrollCoastDuration" "600" Option "ScrollCoastEnableSpeed" "0.05" # This sets up Macbook-like natural scroll. If you want to scroll down by swiping your fingers down, reverse the "5" and the "4" here: Option "ScrollUpButton" "5" Option "ScrollDownButton" "4" Option "ScrollLeftButton" "7" Option "ScrollRightButton" "6" # Without this option set to a high value, there are types of click+hold-and-move functionality (most easily reproed by click and then move up-right) that get ignored Option "Hold1Move1StationaryMaxMove" "1000" # Smaller ScrollDistance translates to faster scrolling. ScrollDistance of 10 scrolls a long page in one swipe. Option "ScrollDistance" "22" Option "ScrollClickTime" "12" Option "ScrollSensitivity" "0" EndSection ``` 具体配置选项请参考官网手册:https://github.com/p2rkw/xf86-input-mtrack * update in 2021.9 https://github.com/iberianpig/fusuma * update in 2023.1 https://github.com/ferstar/gestures (更好的选择) 参考: - https://bill.harding.blog/2017/12/27/toward-a-linux-touchpad-as-smooth-as-macbook-pro/
暂无评论
添加新评论
称呼
Email
网站
取消回复
内容
发表评论