Discussion:
Mouse acceleration under Plan 9
(too old to reply)
Brian Vito
2012-08-02 08:57:44 UTC
Permalink
If you'll excuse another question from a non-programmer, does Plan 9
use a mouse pointer acceleration algorithm (if so, where would it be
documented?) or is it 1:1? Thanks so much.
Rudolf Sykora
2012-08-02 09:09:29 UTC
Permalink
Post by Brian Vito
If you'll excuse another question from a non-programmer, does Plan 9
use a mouse pointer acceleration algorithm (if so, where would it be
documented?) or is it 1:1? Thanks so much.
Having read the section 12.3 of `Introduction to Operating systems
Abstractions Using Plan9 from Bell Labs' by F J Ballesteros, I believe
there is some acceleration available.

Ruda
David du Colombier
2012-08-02 09:48:54 UTC
Permalink
Post by Brian Vito
If you'll excuse another question from a non-programmer, does Plan 9
use a mouse pointer acceleration algorithm (if so, where would it be
documented?) or is it 1:1? Thanks so much.
Yes. See mouse(3) and /sys/src/9/port/devmouse.c.
--
David du Colombier
erik quanstrom
2012-08-02 14:48:19 UTC
Permalink
Post by David du Colombier
Post by Brian Vito
If you'll excuse another question from a non-programmer, does Plan 9
use a mouse pointer acceleration algorithm (if so, where would it be
documented?) or is it 1:1? Thanks so much.
Yes. See mouse(3) and /sys/src/9/port/devmouse.c.
however, i've found /hardware/ mouse acceleration to be a mistake.
at least some kvm eat or mangle these commands, which motiviated
me to consider the issue, and i don't see a reason why the kernel
shouldn't just do the acceleration (multiplication) itself. surely one
multiply should be of no concern on a 100Mhz+ computer.

:-)

the code's in the 9atom kernel, fwiw.

- erik
c***@gmx.de
2012-08-03 01:21:04 UTC
Permalink
probably more a resolution thing than the cost of a
multiplication.

kernel gets only deltas at some fixed sample intervals
where the mouse can do it for every encoder cycle.
(no clue how its really done or with optical mice, touchpads
or trackpoints...)

but kernels software mouse acceleration works good
enougth, so we also have it enabled by default instead
of using the hardware one (which caused problems with
some mice on laptops).

--
cinap

erik quanstrom
2012-08-03 01:28:43 UTC
Permalink
probably more a resolution thing than the cost of a
multiplication.
the multiplication is not linear. cf. dztab, so there is no
resolution tradeoff for slow/small movements.

- erik
Loading...