http://qs321.pair.com?node_id=1218863


in reply to Tcl::pTk right-click macOS

Howdy, this is indeed inherited from Tcl/Tk as the OP discovered. I wish I found this earlier, since this was a known issue I reported a few months ago (cf. RT #125050).

I was recently added as a co-maintainer to Tcl::pTk, and have released Tcl::pTk 0.93; one of the things it includes is if it detects macOS aqua, any widget events normally binding to buttons 2 or 3 will bind with the opposite one instead. Note that if your program has its own bind events (i.e. not already provided by a widget) it will still need its own workaround; I will try mentioning this in the Tcl::pTk documentation. The following expression for right-click will evaluate to '<3>' on X11 and Windows, and '<2>' on macOS aqua:

$widget->windowingsystem ne 'aqua' ? '<3>' : '<2>'