Use an event structure and use a "Mouse down" event or "Mouse down?" filter event. Inside the event case place a case structure wired to the "button" event terminal. If the "button" output is "2", the right mouse button got pressed.
You can also use the tools of the "Advanced..Input Device Control" palette.