Mouse Support in XFree86 : XF86Config Options
Previous: Configuring Your Mouse
Next: Mouse Gallery

5. XF86Config Options

The old Pointer section has been replaced by a more general InputDevice section. The following is a minimal example of an InputDevice section for a mouse:


Section "InputDevice"
	Identifier	"Mouse 1"
	Driver		"mouse"
	Option		"Device"	"/dev/mouse"
	Option		"Protocol"	"Auto"
EndSection

The mouse driver supports the following config file options:

5.1. Buttons

This option tells the X server the number of buttons on the mouse. Currently there is no reliable way to automatically detect the correct number. This option is the only means for the X server to obtain it. The default value is three.

Note that if you intend to assign Z axis movement to button events using the ZAxisMapping option below, you need to take account of those buttons into N too.

	Option	"Buttons"	"N"

5.2. ZAxisMappping

This option maps the Z axis (wheel) motion to buttons or to another axis.

	Option	"ZAxisMapping"	"X"
	Option	"ZAxisMapping"	"Y"
	Option	"ZAxisMapping"	"N1 N2"
	Option	"ZAxisMapping"	"N1 N2 N3 N4"

The first example will map the Z axis motion to the X axis motion. Whenever the user moves the wheel/roller, its movement is reported as the X axis motion. When the wheel/roller stays still, the real X axis motion is reported as is. The third example will map negative Z axis motion to the button N1 and positive Z axis motion to the button N2. If this option is used and the buttons N1 or N2 actually exists in the mouse, their actions won't be detected by the X server.

The last example is useful for the mouse with two wheels of which the second wheel is used to generate horizontal scroll action, and the mouse which has a knob or a stick which can detect the horizontal force applied by the user. The motion of the second wheel will be mapped to the buttons N3, for the negative direction, and N4, for the positive direction. If the buttons N3 and N4 actually exist in this mouse, their actions won't be detected by the X server.

NOTE #1: horizontal movement may not always be detected by the current version of the XFree86 X servers, because there appears to be no accepted standard as to how the horizontal direction is encoded in mouse data.

NOTE #2: Some mice think left is the negative horizontal direction, others may think otherwise. Moreover, there are some mice whose two wheels are both mounted vertically, and the direction of the second vertical wheel does not match the first one's.

Currently this option can not be set in the XF86Setup program. You need to edit the XF86Config file by hand to add this option.

5.3. Resolution

The following option will set the mouse device resolution to N counts per inch, if possible:

	Option	"Resolution"	"N"

Not all mice and OSs can support this option. This option can be set in the XF86Setup program.


Mouse Support in XFree86 : XF86Config Options
Previous: Configuring Your Mouse
Next: Mouse Gallery