lkml.org 
[lkml]   [1997]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PS/2 Intellimouse Patch
On Sat, 26 Jul 1997, Michael Funk wrote:

> This is a patch for drivers/char/psaux.c, 2.1.47. I'd appreciate any
> input or comments. The patch gives users a couple of options if they
> happen to be stuck with the Microsoft Intellimouse (the mutant mouse
> with the little wheel in place of the third button), of the PS/2
> persuasion. The reason this is kernel code is firstly, that the
> mouse needs to be initialized before the wheel will do anything.

The /dev/psaux driver was designed to be general enough to make
it possible to do things like this in user-space. You can write
initialization strings (like the ones in your patch) to the
mouse with a user-space program.

> The other modification is to aux_interrupt(). Since gpm, AccelX, etc.
> have no idea how to talk to this guy, #defining INTELLIMOUSE_EMULATE_PS2
> will cause aux_interrupt() to drop every 4th byte read rather than stick
> it into the queue. Turning the wheel does nothing, but at least you can
> use it as a 3-button mouse.

The Intellimouse protocol should be added to X11 and gpm as soon
as possible. In the mean time, a better idea (IMO), is to use an
external program like "mconv" to strip off the fourth byte. The
mconv program was written because the X server didn't know about
the PS/2 protocol at the time the PS/2 mouse kernel driver was
written. It works by reading the data from the device,
transforming the packets to the corresponding Microsoft protocol
packets and writes them to a FIFO, where the X server can pick
them up.

> It might be stated that this monstrosity :) doesn't deserve kernel code,
> but consider the reason I wrote it. I was helping the admin at my school
> set up a new CS lab, all Linux boxes. We were stuck with 40 Gateway
> machines that shipped with these mice, and had to use AccelX for support
> of the graphics boards they came with. Buying 40 new mice wasn't an
> option. I'm sure there are others in similar situations.

Hmm, there is one thing I don't understand. Why would you have
had to have all the 40 mice replaced? You said they behave as
standard PS/2 mice, except that the wheel doesn't do anything.
Then you write a patch to enable the wheel, which screws up the
protocol, so AccelX doesn't grok it anymore. Therefore you undo
the whole thing by stripping off the wheel information byte in
aux_interrupt(), thus making the mouse behave like a standard
two-button PS/2 mouse again... Huh?

Johan Myreen
jem@iki.fi


\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.077 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site