A Procrastinator's Journal

Thinking aloud…

Enable/disable input devices

leave a comment »

The right mouse button on my eeepc keeps troubling me intermittently (the right button remains pressed–probably it’s shorted sometimes). Although I rarely use the touchpad and its buttons (use a wireless mouse instead), the constant input of right click makes the eeepc unusable when this happens.

The solution?

Xorg provides a facility to control/configure the input devices while plugged in through ‘xinput’.
First, get the full name of the device with
xinput list
identify the device name from the list, e.g., “ImPS/2 Generic Wheel Mouse”

Then, to disable a device, run
xinput --set-int-prop "ImPS/2 Generic Wheel Mouse" "Device Enabled" 8 0

The 8 in this command is the ‘format’ of the attribute. The syntax for ‘xinput’ for newer Xorg is different (use –set-props instead).

To enable it back, run
xinput --set-int-prop "ImPS/2 Generic Wheel Mouse" "Device Enabled" 8 1

Written by ppatil

July 19, 2010 at 6:49 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: