zoukankan      html  css  js  c++  java
  • centos 7 禁用笔记本触摸板设置

    安装 xorg-x11-apps 包: yum install xorg-x11-apps。

    终端输入 xinput list

    找到 PS/2

    记录后面的ID 

    xinput list

    ⎡ Virtual core pointer id=2 [master pointer (3)]
    ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
    ⎜ ↳ PixArt USB Optical Mouse id=12 [slave pointer (2)]
    ⎜ ↳ FSPPS/2 Sentelic FingerSensingPad id=14 [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)]
    ↳ Power Button id=9 [slave keyboard (3)]
    ↳ Sleep Button id=10 [slave keyboard (3)]
    ↳ USB Webcam id=11 [slave keyboard (3)]
    ↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]

    我这儿是14

    然后:
    # 屏蔽   xinput set-int-prop 14 "Device Enabled" 8 0
    
    # 启用   xinput set-int-prop 14 "Device Enabled" 8 1

    简单的脚本

    #!/bin/bash
    #echo "==================================="
    #echo "============触摸板管理程序============"
    if [ $1 == 'on' ]
    then
       xinput set-int-prop 14 "Device Enabled" 8 1
       echo "触摸板开启成功!"
    elif [ $1 == 'off' ]
    then
       xinput set-int-prop 14 "Device Enabled" 8 0
       echo "触摸板关闭成功!"
    else
       echo "请输入参数:on/off"
       echo "比如开启触摸板:FingerSensingPad on"
    fi


    最好不要用数字,在脚本中,因为数字会变。

    #!/bin/bash
    #echo "==================================="
    #echo "============触摸板管理程序============"
    if [ $1 == 'on' ]
    then
    xinput set-int-prop "FSPPS/2 Sentelic FingerSensingPad" "Device Enabled" 8 1
    echo "触摸板开启成功!"
    elif [ $1 == 'off' ]
    then
    xinput set-int-prop "FSPPS/2 Sentelic FingerSensingPad" "Device Enabled" 8 0
    echo "触摸板关闭成功!"
    else
    echo "请输入参数:on/off"
    echo "比如开启触摸板:FingerSensingPad on"
    fi



  • 相关阅读:
    读书笔记《七天学会NodeJS》(5)
    读书笔记《七天学会NodeJS》(4)
    读书笔记《七天学会NodeJS》(3)
    读书笔记《七天学会NodeJS》(2)
    读书笔记《七天学会NodeJS》(1)
    读书笔记《七天学会NodeJS》(0)
    读书笔记《Node.JS开发指南》
    JavaScript比较特殊的一些概念(三)
    JavaScript比较特殊的一些概念(二)
    JavaScript比较特殊的一些概念(一)
  • 原文地址:https://www.cnblogs.com/zhepama/p/3972521.html
Copyright © 2011-2022 走看看