Skip to main content
October 5, 2011
Question

Right-click context menu

  • October 5, 2011
  • 1 reply
  • 1504 views

When the user right-clicks the document when our plug-in tool is active, I would like to show our own menu instead of the context menu that AI displays.  Thus far I haven't been able to intercept the right-click event, and I don't see a way to modify (or even get access to) the context menu that comes up.  It seems only left mouse events are passed to the plug-in.  Am I missing something, or is this just the way it is?

This topic has been closed for replies.

1 reply

October 5, 2011

Now, I'm not sure about this at all, but on Mac I would expect that you could detect a right click by checking for a left click with the appropriate modifier key?

October 5, 2011

I thought of that, but the virtual ToolMouseDown function doesn't get called (nor does the kSelectorAIToolMouseDown message get sent) when doing a right-click.  I don't see any right-click modifiers; there are only keyboard modifers (option key, control key, etc).

A. Patterson
Inspiring
October 5, 2011

I've actually talked with Adobe folks about this and the answer I got was "Its not possible". Which sucks, becuase it would open the door to some interesting functionality. Of course, it'd also open the door to some incredibly stupid plugin UIs if used incorrectly, so that may be why they've disallowed it.

The good news is that now that we're all going to 3rd-party toolkits for UI, we can at least get right-clicks in our own panels! Not the document though, and no evidence that's even being considered unfortunately.