Configuring mouse behavior

Configuring mouse acceleration

You can configure the rate at which the mouse cursor moves across the screen and the point at which the mouse cursor actually begins to accelerate. By configuring these parameters, you can use the mouse for precise positioning when it is moved slowly and you also have the flexibility to move the cursor quickly across the screen.

To configure the mouse's movement parameters, perform the following steps.

  1. Use one of the following configuration tools:

  2. Verify that your changes were successfully implemented by running the following command:

    xset q

Step 1: Setting the movement parameters

There are two parameters that control the movement of the mouse: acceleration and threshold. The acceleration parameter is a multiplier that is applied to the mouse cursor motion. If the acceleration parameter is set to ``4'', the mouse cursor moves across the screen four times faster than you move the mouse.

Setting a high acceleration is convenient for quickly moving the mouse cursor large distances on your screen. However, it can be awkward when you want to position the mouse precisely. The pointer can move too quickly and it becomes difficult to focus the mouse cursor on a small area on your screen. To overcome this problem, you can set the threshold parameter. The threshold controls the number of pixels the mouse cursor must move before the cursor motion accelerates.

For example, suppose you set an acceleration value of ``6'' and a threshold value of ``8''. The mouse is configured so that if you move the mouse cursor more than 8 pixels, the cursor can then move 6 times as fast on the screen as you actually move the physical mouse.

Use the following guidelines for deciding how to configure the mouse movement parameters:

You can use either the scomouse client or the xset command to configure these parameters.

The scomouse client is generally the preferred method for setting the mouse movement parameters:

The parameters you set with the slider bars are implemented immediately and remain in effect until you change them again through the scomouse client. This allows you to test the mouse movement and fine-tune it to your personal preference.

The scomouse client stores the settings for these parameters in a file called ScoMouse, located in $HOME/.odtpref. If you examine this file after you set new values for the movement parameters, you see an entry similar to this:

   scomouse -s 7 -t 10 -r
The -s entry indicates that the acceleration of the mouse has been set to 7 and the -t entry indicates that the threshold has been set to 10. The -r entry indicates the mouse is configured for right-handed use.

You can also set the acceleration and threshold parameters using the xset command, with the m (mouse) option.

NOTE: Mouse movement parameters configured with the xset m command are only in effect for the current session, unless you add the xset m command to an executable script in your $HOME/.odtpref directory.

The scomouse client is more intuitive to use than the xset m command, and is the preferred method for configuring mouse movement behavior for multiple sessions.

To configure the mouse movement parameters with xset, enter:

xset m acceleration_value threshold_value

acceleration_value refers to the value you want for the acceleration parameter, and threshold_value refers to the value you want for the threshold parameter. You must use positive integers to set these parameters.

If you only assign the xset m command one value, the value is assigned to the acceleration parameter. If you want to change the threshold parameter and leave the acceleration parameter unchanged, enter:

xset m default threshold_value

If you want to return to the default acceleration and threshold values, enter:

xset m default

The system defaults specify that the mouse uses an acceleration value of 4 and a threshold value of 2.

See also:

Step 2: Listing the new mouse settings

Once you have configured the mouse movement parameters, you may want to verify that your changes were successfully implemented by the X server. Enter the following command:

xset q

The q option lists the current values of all of the xset preferences. The mouse movement parameters are included in this list, as shown in the following example:

   Pointer Control:
     acceleration:   3 / 1     threshold:  4
This indicates that the mouse cursor on the screen moves three times as fast as you actually move the physical mouse (3/1), and that this occurs after the mouse pointer moves 4 pixels. The default is twice as fast (2/1).
Next topic: Specifying the mouse double-click duration
Previous topic: Step 2: Listing the new mouse button mappings

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003