Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!news.sdsmt.edu!nntp.uac.net!news.tufts.edu!blanket.mitre.org!news.mathworks.com!news2.mathworks.com!newscaster-1.mcast.net!cs.tu-berlin.de!zib-berlin.de!irz401!uriah.heep!news From: j@uriah.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc,comp.windows.x.i386unix Subject: Re: 3 button mice for X11 Date: 27 May 1996 20:23:42 GMT Organization: Private BSD site, Dresden Lines: 56 Message-ID: <4od30e$i9k@uriah.heep.sax.de> References: <4ocfvr$rm6@linet06.li.net> Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) NNTP-Posting-Host: localhost.heep.sax.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: knews 0.9.6 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:20191 comp.windows.x.i386unix:20113 jwc@newshost.li.net (John W. Carbone) wrote: > Would someone please recommend a 3 button mouse that is NOT > specifically designed for right handed people? I'm using a good ol' MouseSystems optical mouse. It once accompanied a Data General workstation, but is more commonly known as a ``Sun Mouse'' (though you must be careful, there are Sun mice with only 3 wires, you cannot use them on a PC, you need a RS-232 interface one). It's not specifically designed for right-handed people, and i figure i could also use it with the left hand, if I) i had learned how to use it in the left hand, and II) i had the space there on my desk. :) Unfortunately, i don't think the XFree86 servers do support swapping mouse buttons 1 and 3. This seems to be a useful extension, and i'm sure they will integrate it if you provide a patch. I don't think it's actually very hard to implement. The following code snippet from xc/programs/Xserver/hw/xfree86/common/xf86_Mouse.c shows the final part of the mouse protocol handling (function xf86MouseProtocol()): /* * assembly full package */ switch(xf86Info.mseType) { case P_LOGIMAN: /* MouseMan / TrackMan [CHRIS-211092] */ case P_MS: /* Microsoft */ ... } xf86PostMseEvent(buttons, dx, dy); pBufP = 0; } } If you add a line above the call to xf86PostMseEvent(), doing just: buttons = (buttons & 2) + ((buttons & 1) << 2) + ((buttons & 4) >> 2); dependant on some option in the Pointer section of XF86Config, you're already done. If you think this costs too much speed, encode all the possible combinations into an array (2^3 = 8 bytes needed), and do buttons = button_reverse[buttons]; instead. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)