> > > > On Sun Sep 16 06:27:51 2018, welleozean@googlemail.com wrote:
> > > > > Hello,
> > > > >
> > > > > Perl 5.28
> > > > > macOS: HighSierra
> > > > > Tcl: shipped with macOS
> > > > > Tcl::pTk-0.94
> > > > >
> > > > > I found a strange behavior when right-clicking (I am using the
> > > > > trackpad) on
> > > > > any Widget that has a linked contextual menu (Text, Entry and
> > > > > so
> > > > > on):
> > > > > the
> > > > > menu is shown but at the same it seems to perform a copy and
> > > > > paste
> > > > > operation. Simply try one of the demo widgets (widgetTclpTk-
> > > > > >Basic
> > > > > editable
> > > > > text), highlight a word, and right-click on it. The popup is
> > > > > shown
> > > > > and
> > > > > after a while (the time windows seems to vary (?!?)) the
> > > > > highlighted
> > > > > term
> > > > > is copied in the Text Widget. I have already read the following
> > > > > node
> > > > > with
> > > > > what are - I guess - related problems:
> > > > >
https://www.perlmonks.org/?node_id=1215349
> > > > > This problem prevents the use of any right-click features and
> > > > > should
> > > > > be
> > > > > addressed. Any workaround?
> > > > >
> > > > > Best,
> > > > > Welle
> > > >
> > > > That does sound related to the general issue of middle-click and
> > > > right-click
> > > > (buttons 2 and 3) being swapped on macOS aqua (RT #125050, which
> > > > I
> > > > believe I
> > > > had fixed in Tcl::pTk 0.93).
> > > >
> > > > But what you're observing sounds more like both the intended
> > > > right-
> > > > click
> > > > behavior (popup menu) as well the middle-click behavior (Unix-
> > > > style
> > > > shortcut to
> > > > paste the selected text) happening at the same time. So far I
> > > > cannot
> > > > reproduce
> > > > the issue in 0.94 with Tk 8.6.8, but I will look carefully again
> > > > to
> > > > see if
> > > > there's something like extra `bind()` to the text or entry widget
> > > > or
> > > > one that I
> > > > wrote backwards.
> > > >
> > > > I doubt that it's your machine/trackpad that's sending a middle-
> > > > click
> > > > event,
> > > > since there doesn't seem to be anything in System Preferences for
> > > > doing that
> > > > with a trackpad.
> > > >
> > > > I'm curious what happens on your machine for an actual middle-
> > > > click
> > > > event (I
> > > > would expect nothing to happen given your observation). If you
> > > > don't
> > > > happen to
> > > > have a USB/bluetooth mouse with a middle button (clickable mouse
> > > > wheel), would
> > > > you be able to try using Karabiner-elements to emulate a button2
> > > > click
> > > > from the
> > > > keyboard?
> > > I suspect the old Tk version might be what's causing this. I didn't
> > > Tcl/Tk.
> > > happens for middle click, but for 8.5.9 it happens for right click.
> > > behavior for this seems to have changed between Tk 8.5.9 and 8.6.8.
> > > from Perl, i.e. for making sure it's using the right button even
> > > Tcl/Tk version.