[comp.sys.att] unix pc mouse help?

ram@umb.umb.edu (Robert Morris) (10/10/88)

Is there any way to get relative mouse tracking on a unix pc? The only
mouse interface I can see is that described in window(7) which reports
the position of the mouse relative to the window, whereas I want
simple report of motion. In particular, the mouse has some silly notion
that mice and screens are intimately related, and stops reporting if
the mouse cursor is at the screen edge. In fact, I want to position my
own cursor images in ways not related to where the system thinks the
mouse last was, so I want a complete decoupling of screen and mouse.

Also, I would prefer an interrupt driven mouse with reports not
delivered to the input stream. The scheme in window(7) is very
system-call intensive and seems to be heavily tied to the pc's window
system. 

Bob Morris
ram@typo.umb.edu
...harvard!umb!typo!ram

ditto@cbmvax.UUCP (Michael "Ford" Ditto) (10/12/88)

In article <702@umb.umb.edu> ram@typo.umb.edu (Robert Morris) writes:
>Is there any way to get relative mouse tracking on a unix pc? The only
>mouse interface I can see is that described in window(7) which reports
>the position of the mouse relative to the window, whereas I want
>simple report of motion.

The low-level part of the mouse device driver is part of the keyboard
driver, source code for which was posted here a while back.  If you look
at this code, you can see that the low-level driver simply uses the
mouse events to update the position of the "pointer", which is limited
to the physical screen.  The driver does not store the relative mouse
movements or pass them on to the window driver, Therefore, what you
want is not possible without changing the driver.

I have considered doing this, but if you don't feel like waiting,
hack away at the driver.  I might make a /dev/mouse, which, if
opened, would "take over" the mouse input and return the relative
movements of the mouse.  Or, mouse movement could be converted into
escape sequences and sent down the input stream; this would make
it easier for a program to block until it gets either mouse or
keyboard input.
-- 
					-=] Ford [=-

"The number of Unix installations	(In Real Life:  Mike Ditto)
has grown to 10, with more expected."	ford@kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!elgar!ford
  2nd Edition, June, 1972.		ditto@cbmvax.commodore.com