Subject: Re: ADB mouse button 2 won't work
From: Andrew B. Arthur (arthur99@global2000.net)
Date: Sun Nov 07 1999 - 16:40:54 MST
> Jamie Orchard-Hays on 11/7/99 1:36 PM wrote:
> I've got Champion server 1.1 on my 8500 using a Macally 2-button mouse. No
> matter what I try, I can't get the second button to do anything under linux
> (it works fine in the MacOS). mouseconfig is set up, etc. I've searched
> through the lists, but found nothing that helps so far. Any suggestions are
> greatly appreciated.
I have that mouse, and I truly love it. It's the best $20 I have spent in a
while.
As root type (preferably add this to /etc/rc.d/rc.local so it happens on
boot all of the time) [Basically this tells mousemode what interrupt your
second mouse button is at]:
/sbin/mousemode 3 66
Then, after you have started your X Server (maybe put this in ~/.Xclients or
the KDE Autostart folder?) [This Reverses the order of buttons so right
click gives you right click and not middle click]:
xmodmap -e "pointer = 1 3 2"
An even better option is to get kernel 2.2.12 or later and install this
patch on the source (this seems to fix some problems a few people have
especially with middle clicking and needing to tell it about the mouse
interrupt).
--- drivers/macintosh/mac_keyb.old Fri Aug 27 23:44:58 1999
+++ drivers/macintosh/mac_keyb.c Sat Aug 28 00:02:23 1999
@@ -272,6 +272,7 @@
#define ADBMOUSE_MICROSPEED 6 /* Microspeed mouse (&trackball ?),
MacPoint */
#define ADBMOUSE_TRACKBALLPRO 7 /* Trackball Pro (special buttons) */
#define ADBMOUSE_MS_A3 8 /* Mouse systems A3 trackball (handler
3) */
+#define ADBMOUSE_MACALLY2 9 /* MacAlly 2-button mouse */
static int adb_mouse_kinds[16];
@@ -490,6 +491,18 @@
data[3] = byyy bxxx Third button and fourth button. Y is additional
high bits of y-axis motion. XY is additional
high bits of x-axis motion.
+
+ MacAlly 2-button mouse protocol.
+
+ For MacAlly 2-button mouse protocol the data array will contain the
+ following values:
+
+ BITS COMMENTS
+ data[0] = dddd 1100 ADB command: Talk, register 0, for device dddd.
+ data[1] = bxxx xxxx Left button and x-axis motion.
+ data[2] = byyy yyyy Right button and y-axis motion.
+ data[3] = ???? ???? unknown
+ data[4] = ???? ???? unknown
*/
struct kbd_struct *kbd;
@@ -521,6 +534,11 @@
data[2] = (data[2] & 0x7f) | ((data[3] & 0x02) << 6);
data[3] = ((data[3] & 0x04) << 5);
break;
+ case ADBMOUSE_MACALLY2:
+ data[3] = (data[2] & 0x80) ? 0x80 : 0x00;
+ data[2] |= 0x80; /* 2nd button is mapped as button 3 */
+ nb=4;
+ break;
}
if (adb_mouse_interrupt_hook)
@@ -825,6 +843,14 @@
(req.reply[1] == 0x4b) && (req.reply[2] == 0x4d) &&
(req.reply[3] == 0x4c) && (req.reply[4] == 0x31))
init_turbomouse(id);
+ else if ((req.reply_len == 9) &&
+ (req.reply[1] == 0x4b) && (req.reply[2] == 0x4f) &&
+ (req.reply[3] == 0x49) && (req.reply[4] == 0x54)){
+ if (adb_try_handler_change(id, 0x42)) {
+ printk("\nADB MacAlly 2-button mouse at %d, handler set
to 0x42", id);
+ adb_mouse_kinds[id] = ADBMOUSE_MACALLY2;
+ }
+ }
}
printk("\n");
}
Thanks,
Andrew B. Arthur
arthur99@globa2000.net
(G)AIM: AArthur PPC
This archive was generated by hypermail 2a24 : Fri Dec 03 1999 - 19:07:32 MST