# How to modify the default mouse leftbuttondown to rightbuttondown?

**URL:** <https://discourse.slicer.org/t/how-to-modify-the-default-mouse-leftbuttondown-to-rightbuttondown/13207>\
**Category:** Development\
**Created:** [August 28, 2020, 3:12am UTC](https://discourse.slicer.org/t/how-to-modify-the-default-mouse-leftbuttondown-to-rightbuttondown/13207 "2020-08-28T03:12:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pingdan](https://avatars.discourse-cdn.com/v4/letter/p/22d042/32.png) [@pingdan](https://discourse.slicer.org/u/pingdan)\
**Post date:** [August 28, 2020, 3:12am UTC](https://discourse.slicer.org/t/how-to-modify-the-default-mouse-leftbuttondown-to-rightbuttondown/13207/1 "2020-08-28T03:12:12Z")

</div>

I use vtkImagePlaneWidget to display a image. the default operation is leftbutton change window/level, now I need to rightbutton change window/level, how can I do?

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 28, 2020, 3:42am UTC](https://discourse.slicer.org/t/how-to-modify-the-default-mouse-leftbuttondown-to-rightbuttondown/13207/2 "2020-08-28T03:42:45Z")

</div>

In current Slicer version, window/level has a separate mouse mode.

If you still want to change the _interaction event_ (mouse move, clicks, etc.) to _widget event_ (adjust window/level, reset window/level, etc.) mapping then it can be done [here](https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLWindowLevelWidget.cxx#L79-L91) just by modifying a few lines. If necessary, we can expose these in Python, too. At some point, we’ll make this mapping editable from the user interface, too.
