&Mike.McBride; &Mike.McBride.mail;
&Brad.Hards; &Brad.Hards.mail;
2009-11-22
&kde; 4.4

This is the documentation for the &kde; &systemsettings; module that configures mice and other pointing devices.

KDE
Systemsettings
mouse

## Mouse

This module allows you to configure your pointing device. Your pointing device may be a mouse, a track ball, a touch-pad, or another piece of hardware that performs a similar function.

This module is divided into several tabs: General, Cursor Theme, Advanced and Mouse Navigation. There may also be one or more additional tabs if you have a Logitech mouse or trackball, providing access to special features.

### General

Button Order

  If you are left-handed, you may prefer to swap the functions of the left and right buttons on your pointing device by choosing the Left handed option. If your pointing device has more than two buttons, only those that function as the left and right buttons are affected. For example, if you have a three-button mouse, the middle button is unaffected.

Reverse scroll direction

  With this check box selected, the scroll wheel (if any) will work in the opposite direction (so that if rolling the top of the scroll wheel towards you previously causes a scroll down, then it will now cause a scroll up). This may be useful to handle a unusual setup of the X server.

Double-click to open files and folders (select icons on first click)

  If this option is not checked, icons/files will be opened with a single click of the left mouse-button. This default behavior is consistent with what you would expect when you click links in most web browsers. If checked however, icons/files will be opened with a double click, while a single click will only select the icon or file. This is the behavior you may know from other desktops or operating systems.

Single-click to open files and folders

  This is the default setting for &kde;. Clicking once on an icon will open it. To select you can drag around the icon(s) or &Ctrl;Right click, or simply click and hold to drag it. You can also enable automatic selection of icons using the Automatically select icons check box, discussed below.

Change pointer shape over icons

  When this option is checked, the shape of the mouse pointer changes whenever it is over an icon.

  This option should be checked in most situations. It gives more visual feedback and says, in essence, if you click here, something will happen.

Automatically select icons

  As noted above, if you have Single-click to open files and folders selected, you can select icons by dragging around them, or by using &Ctrl;Right click. If you routinely need to select icons, you may want to enable this check box, which will allow icons to be selected automatically by pausing over the icon. The Delay: slider determines how long is required before the automatic selection takes effect.

### Cursor Theme

This tab allows you to select from a number of cursor themes. A preview of the cursor display is shown above the list box.

The features provided by this tab may not be available on some systems. Your system may need to be updated to support cursor themes.

If you have additional cursor themes available, you can install and remove them using the buttons below the list box. Note that you cannot remove the default themes.

### Advanced

Pointer acceleration

  This option allows you to change the relationship between the distance that the mouse pointer moves on the screen and the relative movement of the physical device itself (which may be a mouse, track-ball, or some other pointing device.)

  A high value for the acceleration multiplier will lead to large movements of the mouse pointer on the screen, even when you only make a small movement with the physical device.

  A multiplier between 1x and 3x will works well for many systems. With a multiplier over 3x the mouse pointer may become difficult to control.

Pointer threshold

  The threshold is the smallest distance that the mouse pointer must move on the screen before acceleration has any effect. If the movement is within the threshold, the mouse pointer moves as if the acceleration were set to 1x.

  Thus, when you make small movements with the physical device (&eg; mouse), you still have fine control of the mouse pointer on the screen, whereas larger movements of the physical device will move the mouse pointer rapidly to different areas on the screen.

  You can set the threshold by entering a value into the edit box or by clicking the up/down arrows to the right of the box.

  In general, the higher you set the Pointer acceleration value, the higher you will want to set the Pointer threshold value. For example, a Pointer threshold of 4 pixels may be appropriate for a Pointer Acceleration of 2x, but 10 pixels might be better for 3x.

Double click interval

  This is the maximum amount of time between clicks for &kde; to register a double click. If you click twice, and the time between those two clicks is less than this number, &kde; recognizes that as a double click. If the time between these two clicks is greater than this number, &kde; recognizes those as two separate single clicks.

Drag start time and Drag start distance

  If you

  - click with the mouse

  - drag within the time specified in Drag start time, and

  - move a distance equal to or greater than the number (of pixels) specified in Drag start distance

  &kde; will drag the selected item.
Mouse wheel scrolls by

  If you have a wheel mouse, use the slider to determine how many lines of text one step of the mouse wheel will scroll.

### Mouse Navigation

This tab allows you to configure the keyboard number pad keys as a mouse-type device. This may be useful when you are working on a device without another pointing device, or where you have no other use for the number pad.

Move pointer with keyboard (using the num pad)

  To enable keyboard mouse mode, you need to select the check box labeled Move pointer with keyboard (using the num pad). When you do this, the other settings will become enabled, and you can customize the keyboard pointer behavior further, if required.

  The various keys on the number pad move in the direction you would expect. Note that you can move diagonally as well as up, down, left and right. The 5 key emulates a click to a pointer button, typically &LMB;. You change which button is emulated by using the / key (which makes it &LMB;), * key (which makes it &MMB;) and - (which makes it &RMB;). Using the + emulates a double click to the selected pointer button. You can use the 0 key to emulate holding down the selected pointer button (for easy dragging), and then use the . to emulate releasing the selected pointer button.

Acceleration delay

  This is the time (in milliseconds) between the initial key press and the first repeated motion event for mouse key acceleration.

Repeat interval

  This is the time in milliseconds between repeated motion events for mouse key acceleration.

Acceleration time

  This is the number of key events before the pointer reaches a maximum speed for mouse key acceleration.

Maximum speed

  This is the maximum speed in pixels per key event the pointer can reach for mouse key acceleration.

Acceleration profile

  This is the slope of the acceleration curve for mouse key acceleration.

### Logitech Support

Some Logitech USB mice support special features, such as switching to a higher resolution, or providing cordless status. If &kde; was built with libusb support, then you will get an additional tab for each supported mouse that is plugged in.

The supported devices are:

1. Wheel Mouse Optical

2. MouseMan Traveler

3. MouseMan Dual Optical

4. MX310 Optical Mouse

5. MX510 Optical Mouse

6. MX300 Optical Mouse

7. MX500 Optical Mouse

8. iFeel Mouse

9. Mouse Receiver

10. Dual Receiver

11. Cordless Freedom Optical

12. Cordless Elite Duo

13. MX700 Optical Mouse

14. Cordless Optical Trackman

15. Cordless MX Duo Receiver

16. MX100 Laser Mouse

17. Receiver for Cordless Presenter

Not all devices support all capabilities (typically cordless devices do not provide resolution switching, and of course only cordless devices support cordless status reporting), so some parts of the tab will not be enabled for some mouse types.

If the mouse supports resolution switching, the Sensor Resolution radio button group will be enabled, and you can switch from 400 counts per inch to 800 counts per inch and back. If you use 800 counts per inch, the same physical movement of the mouse will cause a greater (roughly double) amount of motion of the cursor. This tends to be popular amongst gamers.

If the mouse supports cordless reporting, the Battery Level and RF Channel widgets will be enabled. You can only change the RF Channel if your mouse has two channel support.

#### Fixing permission problems on Logitech mice

Because of the way USB devices work, the code that accesses the current status on Logitech mice needs to be able to write to the mouse. This should be handled by your distribution, but if not, you may need to do some configuration yourself.

On a &Linux; system, you should use the hotplug system to change the ownership and permissions on the mouse entry in `/proc/bus/usb`. One way to do this is to create a short script (`/etc/hotplug/usb/consoleUserPerms`) that changes the ownership and permissions, as shown below:

    #!/bin/bash
    #
    # /etc/hotplug/usb/consoleUserPerms
    #
    # Sets up newly plugged in USB device so that the user who owns
    # the console according to pam_console can access it from user space
    #
    # Note that for this script to work, you'll need all of the following:
    # a) a line in the file /etc/hotplug/usb.usermap or another usermap file
    #    in /etc/hotplug/usb/ that corresponds to the device you are using.
    # b) a setup using pam_console creates the respective lock files
    #    containing the name of the respective user. You can check for that
    #    by executing "echo `cat /var/{run,lock}/console.lock`" and
    #    verifying the appropriate user is mentioned somewhere there.
    # c) a Linux kernel supporting hotplug and usbdevfs
    # d) the hotplug package (http://linux-hotplug.sourceforge.net/)
    #
    # In the usermap file, the first field "usb module" should be named
    # "consoleUserPerms" to invoke this script.
    #

    if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
    then
    # New code, using lock files instead of copying /dev/console permissions
    # This also works with non-kdm logins (e.g. on a virtual terminal)
    # Idea and code from Nalin Dahyabhai <nalin@redhat.com>
        if [ -f /var/run/console.lock ]
        then
            CONSOLEOWNER=`cat /var/run/console.lock`
        elif [ -f /var/lock/console.lock ]
        then
            CONSOLEOWNER=`cat /var/lock/console.lock`
        else
            CONSOLEOWNER=
        fi
        if [ -n "$CONSOLEOWNER" ]
        then
            chmod 0000 "${DEVICE}"
            chown "$CONSOLEOWNER" "${DEVICE}"
            chmod 0600 "${DEVICE}"
        fi
    fi

The usermap file that goes with this is `/etc/hotplug/usb/logitechmouse.usermap`, as shown below:

    # script           match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
    # Wheel Mouse Optical
    consoleUserPerms     0x0003      0x046d   0xc00e    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # MouseMan Traveler
    consoleUserPerms     0x0003      0x046d   0xc00f    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # MouseMan Dual Optical
    consoleUserPerms     0x0003      0x046d   0xc012    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # MX310 Optical Mouse
    consoleUserPerms     0x0003      0x046d   0xc01b    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # MX510 Optical Mouse
    consoleUserPerms     0x0003      0x046d   0xc01d    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # MX300 Optical Mouse
    consoleUserPerms     0x0003      0x046d   0xc024    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # MX500 Optical Mouse
    consoleUserPerms     0x0003      0x046d   0xc025    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # iFeel Mouse
    consoleUserPerms     0x0003      0x046d   0xc031    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # Mouse Receiver
    consoleUserPerms     0x0003      0x046d   0xc501    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # Dual Receiver
    consoleUserPerms     0x0003      0x046d   0xc502    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # Cordless Freedom Optical
    consoleUserPerms     0x0003      0x046d   0xc504    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # Cordless Elite Duo
    consoleUserPerms     0x0003      0x046d   0xc505    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # MX700 Optical Mouse
    consoleUserPerms     0x0003      0x046d   0xc506    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # Cordless Optical Trackman
    consoleUserPerms     0x0003      0x046d   0xc508    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # Cordless MX Duo Receiver
    consoleUserPerms     0x0003      0x046d   0xc50b    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # MX100 Laser Mouse
    consoleUserPerms     0x0003      0x046d   0xc50e    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000
    # Receiver for Cordless Presenter
    consoleUserPerms     0x0003      0x046d   0xc702    0x0000       0xffff      0x00         0x00            0x00            0x00            0x00               0x00               0x00000000

That should be all that is needed on &Linux; - just copy the files into `/etc/hotplug/usb/`, and when the mouse is plugged in, the ownership and permissions should be changed so that the user at the console can access the mouse.