But I have a user on a macintosh with what he describes
as a left, right and thumb button on his mouse but
he can't seem to get to that context menu.
What is the "proper" way to do this kind of interaction
on the mac?
Thanks,
Keith
The usual Mac equivalent of Button-3 is Control-ButtonPress-1.
You can create a synthetic event called B3 and define it differently
depending on the platform:
On the Mac define it as:
event add <<B3>> <Control-ButtonPress-1>
everywhere else you define it as:
event add <<B3>> <ButtonPress-3>
--
Bill Poser, Linguistics, University of Pennsylvania
http://www.ling.upenn.edu/~wjposer/ bill...@alum.mit.edu
Right.
Note also that many mouse drivers on the Mac (MacOSX) destroy the
Right-Mouse-Button == B3 connection, allowing the user to start
applications with it or start menu commands. You could also ask
your user to, temporarily, deinstall all custom mouse drivers to
see if that gets B3 to work as expected.
best regards,
Randolf,
--
http://www.ayam3d.org/ Reconstruct the World!
As a side note, this is why you never want to use things such as
<Control-ButtonPress-2> or <Control-ButtonPress3> since on the mac,
Control-Buttonpress IS ButtonPress-3.
Remember, Macs don't have right click, just control-click. The mouse
button merely emulate the keyboard's control key.
OK, so what happens if you do happen to have a multi-button mouse, and use
the right button as a context menu button? Does it get mapped to Control-B1?
> OK, so what happens if you do happen to have a multi-button mouse, and use
> the right button as a context menu button? Does it get mapped to Control-B1?
On a plain MacOSX Tiger, using the default settings, you can actually
bind to <2> and <3> and receive the events for middle and right mouse
buttons just like on UNIX or Windows. Tried that a minute ago with the
Tcl/Tk that came with it.
When a custom mouse driver is installed and the setting for the right
mouse button in its new preferences (I could not find such preferences
in the plain MacOSX btw.) is bound to "context help", I can still bind
to <2> in Tk, but loose <3> (what is that bound to by default?).
I tried this with "MacMiceMouseCommand", installed to fix the horrid
mouse acceleration...
In article <1127106124.9...@g14g2000cwa.googlegroups.com>,
keithv <kve...@gmail.com> wrote:
> My app pops up a context menu when the user presses
> the right mouse button (button-3).
>
> But I have a user on a macintosh with what he describes
> as a left, right and thumb button on his mouse but
> he can't seem to get to that context menu.
Note that Carbon with the system supplied Mac OS X USB mouse driver
assigns button-2 to the right mouse button and button-3 to the middle
button; a holdover from a time when there were mice with only 1 or 2
buttons on the mac...
I've recently made changes to tkaqua to pass on all the 5 possible
mouse buttons supported by Tk, the ordering depends on your hardware,
but button-2 and button-3 will continue to be reversed from the usual
unix convention for backwards compat reasons.
Also added at that time were tk modifier bindings for NumLock (Mod-3)
and the laptop Fn modifier (Mod-4)
Cheers,
Daniel
--
** Daniel A. Steffen ** "And now to something completely
** Dept. of Mathematics ** different" Monty Python
** Macquarie University ** <mailto:ste...@maths.mq.edu.au>
** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/>