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



  • 相关阅读:
    .netcore下Dapper helper类
    C#各版本新增加功能(系列文章)
    MySQL 查询连续登陆7天以上的用户
    MySQL 8.0版本 自动排序函数dense_rank() over()、rank() over()、row_num() over()用法和区别
    MYSQL 查看锁的方式
    MYSQL 回表查询原理,利用联合索引实现索引覆盖
    ES查询某个字段分词结果
    maven 安装和配置
    Java 注解
    Java 异常
  • 原文地址:https://www.cnblogs.com/zhepama/p/3972521.html
Copyright © 2011-2022 走看看