iMac Mouse Three Button Emulation: a solution

2 messages, 2 authors, 2000-02-28 · open the first message on its own page

iMac Mouse Three Button Emulation: a solution

From: Albrecht Dre� <hidden>
Date: 2000-02-28 16:04:36

[I'm afraid the original post was lost?  SORRY if you read this for the third
time now...]

Hi all!

I wrote a patch for linux-pmac-stable, version 2.2.15pre-something which
enables an emulation for the 2nd and 3rd mouse button for the iMac single
button mouse (and possibly other machines with both USB keyboard and mouse).
In principle, it works like the "adb_buttons" stuff, simply catching two kb
events from the keyboard and generating mouse events instead (BTW, the
adb_buttons stuff will NOT work on the iMac, as some people suggested, as it
needs adb keyboard and mouse).

To install the patch, save the stuff below to a file, run "patch -b -p 1 <
file" in the linux source directory, and execute "make menuconfig" or "make
xconfig". If you enable the USB mouse, there is a new check item "Enable
three-button emulation". Check it, save the configuration and build and install
as usual. Add "usb_buttons=x,y" to the kernel parameters (e.g. in BootX), with
x and y set to the keycodes which shall emulate the middle and right button
respectively. The default is "usb_buttons=71,81" for the num lock and = keys
(on an iMac with german keyboard).  Use "showkey -k" to get the keycodes for
your favorite ones.

Please note that you should NOT activate this feature if you have a working
three-button USB mouse, as the code blocks any 2nd and 3rd mouse button events
and passes the emulated ones only. This behaviour is not nice, but I must
admit that I can not imagine a situation where this is really a problem, so I
omitted the code to fix this. An other point: the emulation does of course not
work if you do not have an USB keyboard, e.g. if you connect the iMac Mouse to
a Lombard PowerBook.

I did not test the patch thoroughly yet, but it seems to work fine. I hope that
this is an useful extension, and if there are other people than me who think
so, it might be a good idea to include it in the standard tree (Paul?)?

Yours, Albrecht.

Re: iMac Mouse Three Button Emulation: a solution

From: Michael Schmitz <hidden>
Date: 2000-02-28 16:57:26

Please note that you should NOT activate this feature if you have a working
three-button USB mouse, as the code blocks any 2nd and 3rd mouse button events
and passes the emulated ones only. This behaviour is not nice, but I must
admit that I can not imagine a situation where this is really a problem, so I
omitted the code to fix this. An other point: the emulation does of course not
It's a simple matter of keeping track of the button states, OR'ing
emulated and real buttons together. But it's a bit pointless indeed :-)
work if you do not have an USB keyboard, e.g. if you connect the iMac Mouse to
a Lombard PowerBook.
In which case the ADB button emulation works just fine, via the builtin
ADB trackpad ...

	Michael


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help