Re: Remapping Mouse Keys
> Okay back to the problem. My MacAlly ADB 2 Button Mouse works fine with
> this setup, as left mouse gets me left click, and right mouse gives me
> right click in X (or middle click in console). My Kensington ADB Orbit
> Trackball, on the otherhand causes right click to be mapped to middle
> click in both console or X. This is fine for me in console (as I mostly
> want to middle click in the console for cut and paste). But for X, this
> behavior is just annoyning (as lots of X programs use right click). With
> previous Xpmac revs, I got around this using xmodmap -e "pointer = 1 3
> 2", but this won't work (it broken) due to changes made by Kevin
> Hendricks when porting USB support to Xpmac.
You'd need to change the mapping of butttons in the ADB mouse driver,
either upon detection of the trackball (look at the kernel boot messages
if it's detected as such) or by a new kernel option (like
adbmouse-map=132). Swapping bytes in mouse_input would confuse the mouse
Maybe it's a more generic problem with three button mice: two button mice
send the button state in the high bits of the two data packets and we map
these buttons to 1 and 3. Three button mice send the third and further
button states in extra packets and we should perhaps notice the difference
and remap the buttons whenever we see more than two data packets.
I'd need a dump of the mouse data from you, and that's a bit difficult to
get (I had a patch to read raw ADB data from user space for earlier 2.2
kernels but I haven't tried in a while, so you would need to make the
kernel log all mouse data to the console instead).