# Mouse right click

**URL:** <https://forum.inductiveautomation.com/t/mouse-right-click/6481>\
**Category:** General Discussion\
**Created:** [May 15, 2013, 11:49am UTC](https://forum.inductiveautomation.com/t/mouse-right-click/6481 "2013-05-15T11:49:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![l.blasco](https://avatars.discourse-cdn.com/v4/letter/l/35a633/32.png) [@l.blasco](https://forum.inductiveautomation.com/u/l.blasco)\
**Post date:** [May 15, 2013, 11:49am UTC](https://forum.inductiveautomation.com/t/mouse-right-click/6481/1 "2013-05-15T11:49:14Z")

</div>

Hi everyone

I was wondering how to make a button which tooked action with the right button of the mouse.

Thank you for your time 🙂

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [May 15, 2013, 10:29pm UTC](https://forum.inductiveautomation.com/t/mouse-right-click/6481/2 "2013-05-15T22:29:39Z")

</div>

Hi,

This is an old post (referencing FactoryPMI, which became the Vision module), but has some really good info: [Right Click and Double Click actions](http://inductiveautomation.com/forum/viewtopic.php?f=23&t=2328&hilit=BUTTON3)

In short, what you want is:

`if event.button == event.BUTTON3:
#do stuff`

Regards,

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [May 15, 2013, 10:31pm UTC](https://forum.inductiveautomation.com/t/mouse-right-click/6481/3 "2013-05-15T22:31:54Z")

</div>

And in case it’s not clear, that’s the script on a “mousePressed” event for the button, configured under “Event Handlers” for the component.

Regards,

---

<div class="post-metadata">

**Author:** ![l.blasco](https://avatars.discourse-cdn.com/v4/letter/l/35a633/32.png) [@l.blasco](https://forum.inductiveautomation.com/u/l.blasco)\
**Post date:** [May 16, 2013, 7:32am UTC](https://forum.inductiveautomation.com/t/mouse-right-click/6481/4 "2013-05-16T07:32:46Z")

</div>

thanks a lot!
