Ubuntu supports input-hotplug. With this functionality, it's likely that you won't need to do any configuration at all to make your devices work, assuming they're recognized and set up by the kernel. However, if you do need to do adjust things, read on.
Dynamic Input Configuration with xinput
The xinput command line tool can be used for some on-the-fly configuration adjustments.
To view a listing of the input devices X sees, run:
$ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=8 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=9 [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)] ↳ Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint id=7 [slave keyboard (3)]
Individual devices can be queried for more details by using the numerical id or the name:
$ xinput query-state 9 2 classes : ButtonClass button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up button=up ValuatorClass Mode=Relative Proximity=In valuator=66 valuator=925
xinput can also be used to alter the button mappings on mice and adjust the acceleration and feedback settings.
Different input drivers may also expose arbitrary properties for applications to set. Synaptics touchpads are particularly configurable like this, but other devices have some more general properties.
$ xinput list-props 8 Device 'SynPS/2 Synaptics TouchPad': Device Enabled: 1 Synaptics Edges: 1632, 5312, 1575, 4281 Synaptics Finger: 25, 30, 256 Synaptics Tap Time: 180 Synaptics Tap Move: 220 Synaptics Tap Durations: 180, 180, 100 Synaptics Tap FastTap: 0 [...] $ xinput set-int-prop 8 "Device Enabled" 8 0 $ xinput list-props 8 Device 'SynPS/2 Synaptics TouchPad': Device Enabled: 0 Synaptics Edges: 1632, 5312, 1575, 4281 Synaptics Finger: 25, 30, 256 Synaptics Tap Time: 180 Synaptics Tap Move: 220 Synaptics Tap Durations: 180, 180, 100 Synaptics Tap FastTap: 0 [...]
Input Configuration with InputClass sections
Example: Disabling middle-mouse button paste on a scrollwheel mouse
Scrollwheel mice support a middle-button click event when pressing the scrollwheel. This is a great feature, but you may find it irritating. Fortunately it can be disabled.
First, you need to know the id of the mouse, like this:
$ xinput list | grep 'id=' "Virtual core pointer" id=0 [XPointer] "Virtual core keyboard" id=1 [XKeyboard] "AT Translated Set 2 keyboard" id=2 [XExtensionKeyboard] "Macintosh mouse button emulation" id=3 [XExtensionPointer] "Logitech USB-PS/2 Optical Mouse" id=4 [XExtensionPointer]
My mouse has the Logitech logo printed on it, so I gather I need the last entry.
I can view the current button mapping thusly:
$ xinput get-button-map 4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 10
Really, only the first three numbers have meaning for me. They represent the left, middle, and right mouse buttons.
$ xinput get-button-map 4
I can turn the middle mouse button off by setting it to 0:
$ xinput set-button-map 4 1 0 3
Or I can turn the middle-mouse button into a left-mouse button by setting it to 1:
$ xinput set-button-map 4 1 1 3
To make this set on a per-user basis, I can plug that line into my ~/.xstartup or other init file. It can also be done via configuring a matching InputClass section on xorg.conf.
Custom settings are restored to default when a device is hotplugged, so if you mess up mouse button behavior just unplug it and plug it back in. No need to reboot.
The following documentation was provided by various people in the past. Generally, much of it was written for pre-InputHotplug X, so may or may not still work in Intrepid.
General Multimedia keyboard - Probably out of date as of Intrepid due to input-hotplug
USB keyboard - Probably out of date as of Intrepid due to input-hotplug
Apple Keyboard - Probably out of date as of Intrepid due to input-hotplug
Microsoft Natural Ergonomic 4000 keyboard - Probably obsolete
Logitech G15 keyboard - Probably obsolete
Intellimouse Mouseman buttons - Probably obsolete
Game Controller Config