On Wed, 2002-03-20 at 21:21, Michael Matthew Toomim wrote:

> Thanks for sharing this, Peter.  Could you give a brief overview of what 
> it does differently from the current code?
> 

But offcourse,

the basic idea is that it reads the mouse device
and emulates a mouse on a named pipe; much like
what gpm can do with its forwarding function.

It can read and write a different protocol though.
(implemented protocols are: 
        ps2 
        imps2 
        netps2 
        expps2
        glideps2 
        netscps2 
        thinkps2
)
Which makes it a mouse protocol 'translator'.

The thing that makes it a interresting programm
is that it doesn't do plain forwarding.

The main loop accumulates the mouse movements
and a timer signal (100Hz) modifies this acummulated
movement and presents it to the output pipe.

It needs root permission for RT scheduling; if not run
as a RT prog, the time interval might not be consitent
and this gives a non uniform mouse experience.

The modification.

Based on the fact that the human interface is logarithmic
(think about your eyes and ears) I came up with this
model:

dv/dt *= f( |dv/dt| )   ; where v = (x,y)

For 'f' I chose a simple linear function that satisfies:
 f(1) = 1,
and has a gradient that sets the acceleration level.

This gives a nice exponential acceleration. 

If one wants to play with the model it's all contained
within: 
        sensemouse.c:accel().

As an extra there is that 'dragmouse' feature that translates
the mouse movement into wheel/scroller movements.
Button maps have excisted at some time but got lost.

I hope to have given a complete and comprehensible answer.

regards,

Peter Zijlstra

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to