next up previous contents index
Next: Text Entry Windows Up: Mouse Buttons Previous: Button 3 Operations   Contents   Index

Button 4, Mouse Wheel

Support is provided for a fourth button for those pointing devices which have four buttons. Pressing button 4 does nothing except update the coordinates displayed on-screen. No action is performed. This can be simulated by holding the Ctrl, Shift, and Alt keys while pressing button 1.

Under Unix/Linux, the GTK user interface provides support for mouse wheels, by assuming that up and down clicks are mapped to button 4 and 5 presses. In order to use the mouse wheel, the X server must enable this function. For FreeBSD and Linux, this is enabled in the XF86Config file in /usr/X11R6/lib/X11, by adding the ``ZAxisMapping'' keyword to the ``Pointer'' section, as shown in the example below.

Section "Pointer"
  Protocol        "Auto"
  Device          "/dev/psm0"
  ZAxisMapping    4 5
EndSection

Any window that has scroll bars can be scrolled by moving the pointer over a scroll bar and turning the mouse wheel. The drawing windows, most text windows and help viewer windows respond to the mouse wheel by scrolling when the pointer is in the window, as well as over a scroll bar (if any). In drawing windows, scrolling will be horizontal if Shift is held, and if Ctrl is held (which overrides Shift), the display will zoom in or out intead. The mouse wheel sensitivity can be changed with the MouseWheel variable.


next up previous contents index
Next: Text Entry Windows Up: Mouse Buttons Previous: Button 3 Operations   Contents   Index
Stephen R. Whiteley 2012-04-01