• Linux 禁用笔记本触摸板


    1. 查看有什么设备
    xinput list

    输出:

    ⎡ Virtual core pointer                        id=2    [master pointer  (3)]
    ⎜   ↳ Virtual core XTEST pointer                  id=4    [slave  pointer  (2)]
    ⎜   ↳ PS/2 Logitech Wheel Mouse                   id=14    [slave  pointer  (2)]
    ⎜   ↳ USB OPTICAL MOUSE                           id=10    [slave  pointer  (2)]
    ⎣ Virtual core keyboard                       id=3    [master keyboard (2)]
        ↳ Virtual core XTEST keyboard                 id=5    [slave  keyboard (3)]
        ↳ Power Button                                id=6    [slave  keyboard (3)]
        ↳ Video Bus                                   id=7    [slave  keyboard (3)]
        ↳ Video Bus                                   id=8    [slave  keyboard (3)]
        ↳ Sleep Button                                id=9    [slave  keyboard (3)]
        ↳ USB2.0 HD UVC WebCam                        id=11    [slave  keyboard (3)]
        ↳ Asus WMI hotkeys                            id=12    [slave  keyboard (3)]
        ↳ AT Translated Set 2 keyboard                id=13    [slave  keyboard (3)]

    那么PS/2 Logitech Wheel Mouse就是我的触摸板了. 设备id=14.

    2. 查看触摸板属性

    xinput list-props 14 或者
    xinput list-props 'PS/2 Logitech Wheel Mouse'

    输出

    Device 'PS/2 Logitech Wheel Mouse':
        Device Enabled (136):    1
        Coordinate Transformation Matrix (138):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        Device Accel Profile (262):    0
        Device Accel Constant Deceleration (263):    1.000000
        Device Accel Adaptive Deceleration (264):    1.000000
        Device Accel Velocity Scaling (265):    10.000000
        Device Product ID (254):    2, 1
        Device Node (255):    "/dev/input/event4"
        Evdev Axis Inversion (266):    0, 0
        Evdev Axes Swap (268):    0
        Axis Labels (269):    "Rel X" (146), "Rel Y" (147)
        Button Labels (270):    "Button Left" (139), "Button Middle" (140), "Button Right" (141), "Button Wheel Up" (142), "Button Wheel Down" (143)
        Evdev Middle Button Emulation (271):    0
        Evdev Middle Button Timeout (272):    50
        Evdev Third Button Emulation (273):    0
        Evdev Third Button Emulation Timeout (274):    1000
        Evdev Third Button Emulation Button (275):    3
        Evdev Third Button Emulation Threshold (276):    20
        Evdev Wheel Emulation (277):    0
        Evdev Wheel Emulation Axes (278):    0, 0, 4, 5
        Evdev Wheel Emulation Inertia (279):    10
        Evdev Wheel Emulation Timeout (280):    200
        Evdev Wheel Emulation Button (281):    4
        Evdev Drag Lock Buttons (282):    0

    看到 Device Enabled (136): 1 为启动.

    3. 开关触摸板

    #禁用触摸板
    xinput set-prop 14 'Device Enabled' 0  #通过设备编号+属性名禁用触摸板
    xinput set-prop 'PS/2 Logitech Wheel Mouse' 'Device Enabled' 0 #通过设备名+属性名禁用触摸板
    #启用触摸板
    xinput set-prop 14 136 1 #通过设备编号+属性编号来设置
    xinput set-prop 'PS/2 Logitech Wheel Mouse' 136 1 #通过设备名+属性编号启用

    参考文献: http://www.chenyudong.com/archives/lenovo-laptop-disable-or-enable-touchpad-using-xinput-in-ubuntu.html#i

  • 相关阅读:
    [git 学习篇]自己在github创建一个远程服务器创库
    [git 学习篇]远程创库
    [git 学习篇]删除文件
    [git 学习篇] git checkout 撤销修改
    [git 学习篇]git管理的是修改,并非文件
    log4net面面观之Repository
    log4net面面观之工作原理
    asp.net获取当前页面文件名,参数,域名等方法。统一session验证和权限验证的方法
    C#使用Log4Net记录日志
    SharePoint 2010中的客户端AJAX应用——ASP.NET AJAX模板
  • 原文地址:https://www.cnblogs.com/gssl/p/4970732.html
Copyright © 2020-2023  润新知