[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: switch from ADB to linux keycodes ...



> Thanks for answering my silly question.  I've got this three button
> adb mouse, you see, but I've never been able to get the other two
> mouse buttons to do anything other than act like the first one.  I'd

This usually means the mouse powers up in a Mac mouse compatible mode, and
the MacOS driver then writes some magic bytes to register 2 to switch
the mouse to a different mode.

Needless to say, without knowing what the MacOS driver does it'll be tough
to find out what bytes to send . If you don't have the stomach to
disassemble the MacOS mouse driver, or hook a debug trap into the MacOS
ADB code you could try to brute force search for a byte that will change
the read register 2 result when written to register 2.
All this can be done from user space, look up the source code for Paul
Mackerras' mousehack tool. And look up the 'space aliens ate my mouse'
technote at Apple for details on what this 'register' business is. I've
not done any ADB programming in over two years (and boy am I happy about
that).

If you succeed in figuring out the mode switch command, there's no
guarantee you'll like the result. There's at lease one mouse that switches
to a split personality in this mode: regular mouse for movement and button
1, and keyboard sending arrow key events for the other buttons. Designed
for MacX perhaps :-)

	Michael



Reply to: