From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 1 Dec 1996 14:09:21 +0000 From: miller@hamnavoe.demon.co.uk miller@hamnavoe.demon.co.uk Subject: 3-button mice and clearing dtr Topicbox-Message-UUID: 52e8f45e-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19961201140921.azhfblCGsl1TRh3YNDuVbvUwS6uF-gvzY4ijcjkMYH4@z> If your mouse is like mine, and reverts to 2-button behaviour if dtr is reasserted, you'll find that the suggestion from forsyth@plan9.cs.york.ac.uk: > change aux/mouse.c > > add a timedwrite(ctl, "d0", 2) doesn't do the trick. aux/mouse finishes by writing a "serial ..." command to /dev/mousectl, which causes the kernel to raise dtr and then lock the serial port so it can't be changed again. A sensible solution would probably require adding a new parameter to aux/mouse, and to routines serialmouse() and uartspecial() in the kernel. Or buying a proper three-button mouse. A quicker and dirtier way is: 1. Insert at the end of uartspecial() in /sys/src/9/pc/devuart.c: { char *p; if (iq == &mouseq && (p = getconf("mousedtr"))) uartdtr(up, strtoul(p, 0, 0)); } and rebuild the kernel. 2. Insert into the plan9.ini configuration file the line mousedtr=0 3. In the /bin/termrc shell script, replace the line aux/mouse $mouseport with echo serial$mouseport >'#b/mousectl' This works for me. -- Richard Miller