Section 3.3. Configuring a Touchpad


3.3. Configuring a Touchpad

Many laptops use a Synaptics TouchPad (or an Alps GlidePoint, which can use the same driver). By default, a touchpad will emulate a PS/2 mouse, so it should work fine with the default driver, but if you use the Synaptics-specific driver, you can exquisitely fine-tune the touchpad's extended features.

3.3.1. How Do I Do That?

You will need to manually edit the X server configuration file, /etc/X11/xorg.conf, to make two changes.

It's a good idea to get into the habit of making a backup of configuration files before modifying them, just in case something goes wrong:

# cp /etc/X11/Xorg.conf /etc/X11/Xorg.conf.backup                


First, add an InputDevice line to the ServerLayout section:

Section "ServerLayout"         Identifier     "Default Layout"         Screen      0  "Screen0" 0 0         InputDevice    "Mouse0" "CorePointer"         InputDevice    "TouchPad0" "AlwaysCore"         InputDevice    "Keyboard0" "CoreKeyboard" EndSection

Next, add a new InputDevice section (you can add this to any part of the file that is not between Section and EndSection lines):

Section "InputDevice"         Identifier  "Touchpad0"         Driver      "synaptics"         Option      "SHMConfig"        "on" EndSection

When you restart the X server by restarting the system or pressing Ctrl-Alt-Backspace (save any work first!), the Synaptics driver will be loaded with a default configuration that will permit you to:

  • Click the left mouse button by tapping one finger in the middle area or by tapping the upper-left corner.

  • Drag with the left mouse button by tapping and then dragging one finger (touch-release-touch, then drag).

  • Click the middle mouse button by tapping two fingers in the middle area or by tapping the upper-right corner (this will usually perform a fast-paste of selected text).

  • Click the right mouse button by tapping three fingers in the middle area or by tapping the lower-right corner.

  • Scroll up and down by running your finger up and down the right side (if supported by your application).

  • Scroll left and right by running your finger across the bottom (if supported by your application). Some web browsers, such as Firefox, use this for history navigation (left for previous page, right for next page).

These default options work well for most users, but the driver is incredibly customizable. It's also one of the few X drivers that can be adjusted without restarting the X server, through the use of the synclient program.

Running synclient with the -l option will list the current driver settings:

$ synclient -l Parameter settings:     LeftEdge             = 1900     RightEdge            = 5400     TopEdge              = 1900     BottomEdge           = 4000     FingerLow            = 25     FingerHigh           = 30     MaxTapTime           = 180     MaxTapMove           = 220     MaxDoubleTapTime     = 180     ClickTime            = 100     FastTaps             = 0     EmulateMidButtonTime = 75     VertScrollDelta      = 100     HorizScrollDelta     = 100     MinSpeed             = 0.09     MaxSpeed             = 0.18     AccelFactor          = 0.0015     EdgeMotionMinZ       = 30     EdgeMotionMaxZ       = 160     EdgeMotionMinSpeed   = 1     EdgeMotionMaxSpeed   = 400     EdgeMotionUseAlways  = 0     UpDownScrolling      = 1     LeftRightScrolling   = 1     UpDownRepeat         = 1     LeftRightRepeat      = 1     ScrollButtonRepeat   = 100     TouchpadOff          = 0     GuestMouseOff        = 0     LockedDrags          = 0     RTCornerButton       = 2     RBCornerButton       = 3     LTCornerButton       = 0     LBCornerButton       = 0     TapButton1           = 1     TapButton2           = 2     TapButton3           = 3     CircularScrolling    = 0     CircScrollDelta      = 0.1     CircScrollTrigger    = 0     CircularPad          = 0     PalmDetect           = 1     PalmMinWidth         = 10     PalmMinZ             = 200     CoastingSpeed        = 0

These parameters are fully explained in the manpage for synaptics, but the most commonly altered values are described in Table 3-3.

Table 3-3. Commonly altered Synaptics driver values
OptionsDescriptionReason for change
LeftEdge, TopEdge, RightEdge, BottomEdge Define the border between edge/corner and middle regions of the touchpadUsed to shrink or expand the regions used for scrolling and corner-taps.
PalmDetect, PalmMinWidth, PalmMinZ Configure the touchpad to ignore broad touchesPrevents accidental touches of the user's palm from registering as touchpad events. PalmDetect enables/disables, PamMinWidth sets the minimum touch diameter that will be considered a palm, and PalmMinZ is the minimum pressure required to register a palm.
RTCornerButton, LTCornerButton, LBCornerButton, RBCornerButton Define the mouse-button clicks that will be registered when the user touches the corner of the keypadBy default, the top-right corner can be tapped to produce a middle mouse click, and the bottom-right corner can be tapped to produce a right mouse click. If you are finding that these clicks are being accidentally registered, set these button values to zero (0); alternately, you can select a specific button you wish to associate with a corner tap (1=left, 2=middle, 3=right, 4=down, 5=up, 6=left, 7=right)
TapButton1, TapButton2, TapButton3 Define the mouse-button clicks that will be registered when the user taps in the middle region of the touchpad with one, two, or three fingersIf you find that you accidentally tap the touchpad with more fingers than you intend to use, you can change the two- and three-finger tap buttons. To disable a tap altogether, set the appropriate value to 0.
VertScrollDelta, HorizScrollDelta Define the amount of finger motion required to register a scroll event.Set these values to adjust the scroll rates, or set them to 0 to disable scrolling altogether. Note that smaller values increase sensitivity. If you're finding that Firefox keeps moving back and forth in its History when you accidentally sweep your finger across the touchpad, try setting HorizScrollDelta to 0.
MaxTapTime Defines the maximum time (in milliseconds) in which to detect a tap (which is interpreted as a left mouse click).If tap-to-click drives you bonkers, set this to 0. Otherwise, you can use it to adjust how sensitive your touchpad is to tapping.


To test an option value, use the synclient program:

$ synclient VertScrollDelta=10 $ synclient PalmDetect=0

If you need to find position or pressure values for these options, you can use the monitor (-m) option of synclient to experiment:

$ synclient -m 100     time     x    y   z f  w  l r u d m     multi  gl gm gr gdx gdy    0.000  3277 2899   0 0  0  0 0 0 0 0  00000000   0  0  0   0   0    1.247  3687 3172  65 1  5  0 0 0 0 0  00000000   0  0  0   0   0    1.351  3402 3070   0 0  0  0 0 0 0 0  00000000   0  0  0   0   0    1.871  3926 3650  62 1  4  0 0 0 0 0  00000000   0  0  0   0   0    1.975  4337 3339   0 0  0  0 0 0 0 0  00000000   0  0  0   0   0    2.495  3932 3133   0 0  0  0 0 0 0 0  00000000   0  0  0   0   0    2.599  3816 3245   1 1  9  0 0 0 0 0  00000000   0  0  0   0   0    2.703  3810 3286   1 1  7  0 0 0 0 0  00000000   0  0  0   0   0    2.807  3923 3224   1 1 14  0 0 0 0 0  00000000   0  0  0   0   0    2.911  3923 3224   0 0  0  0 0 0 0 0  00000000   0  0  0   0   0    8.423  4018 3986 131 2  5  0 0 0 0 0  00000000   0  0  0   0   0    8.527  4104 3933 134 2  5  0 0 0 0 0  00000000   0  0  0   0   0    8.631  4653 3827   0 0  0  0 0 0 0 0  00000000   0  0  0   0   0 ...(                   Ctrl-C to terminate)...

In this output, the following options indicate:


x, y, and z

Position and pressure of touch.


f

Finger count.


w

Finger width.


l, r, u, d, m, and multi

Button state (most touchpads have only the l and r buttons). 0 indicates the button is up; 1 indicates the button is down.


All columns starting with g

Guest (secondary) pointing device information, such as a finger button.

Once you have tweaked the values to suit your needs, add your preferred values to the Synaptics InputDevice section of the /etc/X11/xorg.conf file, using the Option keyword:

Section "InputDevice"         Identifier  "Touchpad0"         Driver      "synaptics"         Option      "SHMConfig"        "on"         Option      "VertScrollDelta"  "10"         Option      "PalmDetect"       "0" EndSection

These settings will then take effect when the system is restarted.

3.3.2. How Does It Work?

The Synaptics TouchPad (or Alps GlidePad) device is connected through a PS/2 or USB interface and contains a microcontroller, touch sensor, buttons, and interface electronics. The firmware is programmed to emulate a standard mouse unless (or until) the device driver sends it codes to switch it into native mode.

The Synaptics driver works with the microcontroller in the touchpad to translate user activity into standard mouse signals. There are only 16 types of events that are reported to the X server: button down and button up for buttons 1 through 7, and horizontal and vertical motion. All of the possible tap, press, and slide gestures are translated into combinations of these 16 events.

For example, touching the pad with one finger on the right side (X position greater than RightEdge, and Y position between TopEdge and BottomEdge), and then moving your finger up more than VertScrollDelta units will be interpreted as a vertical scroll action, which will result in a button-down event on button 4, followed by a button-up event on button 4 (this corresponds to rotating the scroll wheel forward one click on a standard mouse).

Not all touchpad models have the hardware or firmware to provide all of the features supported by the driver; for example, most models do not have all of the possible buttons, and some lack multiple-finger or finger-width detection.

3.3.3. What About...

3.3.3.1. ...using a touchpad and a mouse at the same time?

This can be done if the Synaptics device is defined in addition to a traditional mouse, as recommended in the X11 configuration shown in this lab.

3.3.3.2. ...disabling the touchpad automatically when I'm typing?

Even with palm detection, some typists and touchpads register false information during typing (especially true with certain laptop case designs, which transmit case stress to the touchpad). To help in these situations, the Synaptics software includes the syndaemon program, which will automatically disable the touchpad when the keyboard is in use. To start this daemon, simply type its name as a command:

$ syndaemon                

3.3.4. Where Can I Learn More?

  • The manpages for synaptics, synclient, and syndaemon

  • The driver home page: http://web.telia.com/~u89404340/touchpad/




Fedora Linux
Fedora Linux: A Complete Guide to Red Hats Community Distribution
ISBN: 0596526822
EAN: 2147483647
Year: 2006
Pages: 115
Authors: Chris Tyler

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net