Detect right-click menu event

Is there a way to detect when the user right-clicks to display the context menu?