unix pc mouse help?

Michael "Ford" Ditto ditto at cbmvax.UUCP
Wed Oct 12 10:07:33 AEST 1988


In article <702 at umb.umb.edu> ram at 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 at kenobi.cts.com
- The Unix Programmer's Manual,		...!sdcsvax!crash!elgar!ford
  2nd Edition, June, 1972.		ditto at cbmvax.commodore.com



More information about the Comp.sys.att mailing list