WMouse Driver
|
Version 0.3a
|
|
Submitted by: Wildman
Date Posted:
|
Aug-27-2016
|
Last Updated:
|
Aug-27-2016
|
License:
|
Free
|
Downloads:
|
2668
|
Page Views:
|
12684
|
User Rating:
|
awaiting votes..
|
|
About WMouse Driver:
Introduction
============
wmouse is a driver for wheely mouses on the serial port. It has
currently been tested with a Logitech FirstMouse+ (model M-C48),
a Logitech MouseMan+ (model M-CW47), and a Digital Research
Technologies 4D scrolling mouse (model number DRMOUSE4DS,
whatever it's called).
Wheel roll events now have an effect: wheel down does a PageDown,
and wheel up does a PageUp. (Thanks to Patrick Schneider for getting
me to add that until better support shows up!)
Clicking the fourth mouse button (the thumb button on the MouseMan+)
causes a double-click to be generated.
Installation
============
The provided install and uninstall shell scripts do a primitive but
adequate job. They swap the standard mouse driver,
/system/add-ons/input_server/devices/mouse, between its default
location and the wmouse directory; they also swap wmouse between the
wmouse directory and
/boot/home/config/add-ons/input_server/devices/wmouse.
(I believe it necessary to do this since the system add-ons directory
is searched before the user add-ons directory. If the standard mouse
driver gets to a port before wmouse does, wmouse will be unable to
open it.)
Customisation
=============
acceleration:
-------------
wmouse responds to mouse speed settings differently from the standard
mouse driver. The slider in the Mouse preferences editor app runs
from 0 to 10; call this speed. We scale this linearly to run from
0.5 to 5.5; call this k. Call the absolute value of the horizontal
or vertical movement reported by the mouse x. Then the absolute
value of the accelerated movement, f(x), goes like
f(x) = { kx, k <= 1.0,
{ kx - 2(k - 1) * (sqrt(x + 1) - 1), k > 1.0
When k > 1.0, f(x) has the following properties:
o f(0) = 0, so the pointer doesn't move when you're not moving the
mouse.
o f'(0) = 1, so you get single-pixel precision for small movements.
o lim(x -> infinity) f'(x) = k, so you get the acceleration you
asked for (or something resembling it :-) for large movements.
The result of all of this is something that's rather faster than the
acceleration provided in the standard mouse driver, not to mention
IMHO rather nicer. :-)
debug output:
-------------
Extra debugging output is available by uncommenting the
#define DEBUG 1
lines in the source. (Make sure your system debugging output is
turned on---on x86 BeOS R4.5, press F1 while the splash screen is
fading in, set any extra boot options you need, and continue booting.
You can also edit /boot/home/config/settings/kernel/drivers/kernel (a
template is provided in .../sample/kernel.sample) to enable it
permanently.)
Anything else:
--------------
For anything else, edit the source, uninstall, make, and install
again. In particular, if you want to change the keypresses generated
by wheel events, edit wmouse.cpp:notify_changes() and
send_key.cpp:send_key() (there are comments in the appropriate
place: search for B_PAGE_UP). If your modification might be useful
to others, let me know.
Known bugs and limitations
==========================
Ordinary serial mouses are not currently supported.
PS/2 devices are not currently supported.
Plug 'n' Pray info is read (where available) and written to the
debugging output, but it is not currently used (for instance, to look
up the model name or capabilities).
Only the highest-numbered serial port with a mouse attached at the
time the input_server is (re)started is currently used.
To do
=====
Jolly likely:
-------------
support PS/2 mouses---at least, once I find out how to access the port
from the point of view of an input_server device add-on.
support USB mouses---at least, once I get one.
make the fourth button on my MouseMan+ configurable. I'm used to
double-clicking with it under Windoze 95, so that's the default.
Pretty likely:
--------------
support multiple mouses by spawning a separate thread for each port.
Reasonably likely:
------------------
separate speed, acceleration, and threshold. This would necessitate a
new Mouse preferences editor app (but hey, I could do with learning
about Be GUI programing :-) . set_mouse_speed() and get_mouse_speed()
would be inadequate for communicating these changes, so I'd have to
think up something like `send a message to wmouse when the settings
change; then invoke Control(), enqueuing an extra input event
containing the new settings so the filter will find out'. On the
other hand, get_ and set_mouse_speed() use int32s, so I could be
naughty and (mis-)appropriate the 27 unused bits for my own
nefarious purposes.
Unlikely:
---------
support `standard' serial mouses. This is unlikely because (a) I
don't have one, (b) I don't think many people use them with BeOS, and
(c) the standard driver provides exactly the same functionality wmouse
does (or at least it will once I put the acceleration in a filter).
In addition, if I don't support them, I can get rid of that ghastly
(not to mention incomp
|
Details about this version: (no information provided)
|
Intel (BeOS 5) + Source (25.6K)
|
|
|
|