Added support for handling "left- or right-click" trigger.

With these changes it is possible to popup the context menu in both cases: a left click or a right click.