CentOS 6.4 close touchpad
1. Check whether the xorg-x11-app is installed;
Rpm-qa xorg-x11-apps
Use the following command to install xorg-x11-app If Not Installed
Yum install xorg-x11-apps
2. view available input devices in graphic mode
Xinput list
My computer displays the following results:
[Root @ reage input] # xinput list
Required Virtual core pointer id = 2 [master pointer (3)]
Required bytes Virtual core XTEST pointer id = 4 [slave pointer (2)]
Required parameter Macintosh mouse button emulation id = 14 [slave pointer (2)]
⎜ ↳ SIGMACHIP Usb Mouse id = 15 [slave pointer (2)]
Required bytes ImPS/2 Logitech Wheel Mouse id = 13 [slave pointer (2)]
Required Virtual core keyboard id = 3 [master keyboard (2)]
Export Virtual core XTEST keyboard id = 5 [slave keyboard (3)]
Asus Laptop extra buttons id = 6 [slave keyboard (3)]
Found AT Translated Set 2 keyboard id = 7 [slave keyboard (3)]
Required Lid Switch id = 8 [slave keyboard (3)]
Export USB 2.0 Camera id = 9 [slave keyboard (3)]
Export Sleep Button id = 10 [slave keyboard (3)]
Required Video Bus id = 11 [slave keyboard (3)]
Invalid Power Button id = 12 [slave keyboard (3)]
3. Find the device corresponding to the touchpad.
Different Touch devices may have different names, but generally the touchpad is a PS/2 device. So PS/2 and touchpad may appear in the touchpad name. If none of them can be found, you can use the xinput -- set-prop Device id "Device Enabled" 0 in sequence for all the Device IDs in the Virtual core pointer to run the command. After the command is executed, move the touchpad to check whether the touchpad is available, if it is unavailable, the device corresponding to the touchpad is found. Then, use the id "Device Enabled" 1 of the xinput -- set-prop Device to enable all input devices other than the touchpad.
4. Write a script that automatically disables the touchpad
Create touchpad. sh
Vim touchpad. sh
Enter the content
#! /Bin/bash
If ["$1" = "on"] | ["$1" = "1"]
Then
Xinput -- set-prop 13 "Device Enabled" 1
Echo "open"
Elif ["$1" = "off"] | ["$1" = "0"]
Then
Xinput -- set-prop 13 "Device Enabled" 0
Echo "close"
Else
Echo "Please enter the correct parameters: on/off, 0/1. "
Echo "enable the touchpad sh touchpad on or sh touchpad 1. "
Echo "Close touchpad sh touchpad off or sh touchpad 0 ";
Fi