INSTALLATION:

1. make

2. make install

3. mkfifo /dev/imouse

4. In XF86Config, replace the InputDevice section:

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Device" "/dev/imouse"
        Option      "Protocol" "ExplorerPS/2"
        Option      "Emulate3Buttons" "off"
        Option      "ZAxisMapping" "4 5"
EndSection

5. disable gpm (sorry, doesn't play nice with gpm yet)

6. Add something like "<path>/tp-scroll -i /dev/mouse
   /dev/imouse" to rc.local

   If you are using SuSE (>8.1), edit /etc/sysconfig/tp-scroll and
   run "insserv tp-scroll"

 
USAGE: 

1. Scrolling

tp-scroll allows the use of the middle mouse button on a Trackpoint
keyboard for scrolling up and down in applications that support the use of
the wheel on an Intellimouse. The scrolling action is essentially the same
as is used on the Trackpoint Windows drivers; hold down the middle mouse
button and push the stick up and down to scroll.   Scrolling side-to-side
is currently unsupported. If the middle mouse button is pressed and
released, a click event is sent along, so paste still works; however,
no click is sent if the trackpoint is used to scroll the screen.

Note that with tp-scroll installed and configured, dragging with the
middle mouse button is impossible.

tp-scroll works by translating the trackpoint's data stream into
Intellimouse format. When the middle mouse button is pressed and the stick
moved, it is translated into wheel motion by the driver. It should work
with any software that supports mouse-wheel scrolling in X; to XFree86,
a Trackpoint with tp-scroll is indistinguishable from an Intellimouse.

2. Acceleration

The following options control acceleration. The acceleration is
nonlinear. At slow cursor-movement speeds, the acceleration is modest 
(single-pixel movements are always mapped to single-pixel movements). 
At higher speeds, the acceleration ramps up rapidly.

The tp-scroll acceleration renders X acceleration unnecessary; therefore,
mouse acceleration in X should be disabled by setting the acceleration
multiplier to 1.

XY_ACCEL_EXP:	This applies a nonlinear acceleration to the horizontal
and vertical movement of the cursor. Setting XY_ACCEL_EXP to 1.0 disables
acceleration (each pixel reported by the mouse moves the cursor one
pixel on-screen). Setting XY_ACCEL_EXP to 2.0 results in an extremely
agressive acceleration and will basically send the cursor flying across
the screen if the trackpoint is pushed with any significant pressure.

Values lower than 1.0 should not be used.

Z_ACCEL_MULT:	This variable controls the basic, unaccelerated rate of
scrolling when the middle mouse button is depressed. If Z_ACCEL_MULT is
set to 1, one pixel of movement with the MMB down is translated to one
scroll-wheel 'click.' When Z_ACCEL_MULT is set to 0.02, 50 (1 / 0.02)
pixels of movement are required to trigger one scroll-wheel event. While
the MMB is down, any movement will be accumulated, and a scroll-wheel
event will be sent once the accumulated motion times Z_ACCESS_MULT 
exceeds +/- 1.

Z_ACCEL_EXP:	This applies an exponential acceleration to the
Z-axis movement. This is done before the the multiplier; the movement
reported from the Trackpoint is first accelerated as in the XY case
above, and then multiplied by Z_ACCEL_MULT and accumulated. 


I use the following values for these options:
XY_ACCEL_EXP	1.6
Z_ACCEL_EXP	1.2
Z_ACCEL_MULT	0.02

Note that these represent relatively aggressive acceleration; if
you don't like your mouse extremely sensitive, it is probably best
to reduce these values significantly.

To change these options, edit /etc/sysconfig/tp-scroll or/and change
the command line arguments. 

The following options are available:

-i | --input     Input-device (default: /dev/mouse)
-o | --output    Pseudo-mouse-device (default: /dev/imouse)

Acceleration:
-x | --vx        XY_ACCEL_EXP (default: 1.60)
-z | --vz        Z_ACCEL_EXP (default: 1.20)
-m | --mz        Z_ACCEL_MULT (default: 0.02)


Please note that this is not really even "alpha" quality software; it's
simply an evil hack that happens to work for me. It does not play nice
with gpm (gpm will not work properly with tp-scroll running). It
probably will work on most normal PS/2 mice (although the scrolling
action would be quite awkward in this case). Running tp-scroll in its
current state might allow scrolling, fail miserably, or possibly
even make your machine catch fire. :) 

BUGS:

There is some support for horizontal scrolling in this code; however,
I have not ever actually gotten this to work with an X server.

Documentation is inadequate, and the installation procedure needs to 
be automated.

This software is currently incompatible with gpm. 

AUTHOR:

Daniel Grobe Sachs <sachs@uiuc.edu>

MODIFIED BY:

Christoph Thiel <ct@kki.org>

LICENSE:  
The following is a standard BSD-style license.

Copyright (c) 2002, Daniel Grobe Sachs 
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

    * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.  

    * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

