# Event on double right click in a given view

**URL:** https://discourse.slicer.org/t/event-on-double-right-click-in-a-given-view/27486
**Category:** Support
**Created:** [January 26, 2023, 5:16pm UTC](https://discourse.slicer.org/t/event-on-double-right-click-in-a-given-view/27486 "2023-01-26T17:16:09Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![rhodesdante](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@rhodesdante](https://discourse.slicer.org/u/rhodesdante)
#### Post date: [January 26, 2023, 9:22pm UTC](https://discourse.slicer.org/t/event-on-double-right-click-in-a-given-view/27486/2 "2023-01-26T21:22:33Z")

</div>

After doing some digging in the script repository & on the forum, I found some helpful answers (see [here](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#keyboard-shortcuts-and-mouse-gestures) and [here](https://discourse.slicer.org/t/mouse-click-over-slice/24967/2)). However, much of what I found advises that one use the markups module for interactions with the slice viewer. I’m sure this might work, but it seems a little roundabout for what I actually need to do. Is there no way to:

1. set an event translation via something like:  
sliceViewWidget = slicer.app.layoutManager().sliceWidget(“Red”)  
displayableManager = sliceViewWidget.sliceView().displayableManagerByClassName(“vtkMRMLCrosshairDisplayableManager”)  
widget = displayableManager.GetSliceIntersectionWidget()  
widget.SetEventTranslation(widget.WidgetStateAny, vtk.vtkCommand.RightButtonDoubleClickEvent, vtk.vtkEvent.NoModifier, widget.WidgetEventCustomAction1)

2. Take the translation and set an observer on a vtkMRMLsliceNode or a vtkMRMLcrosshairNode?  
i.e. sliceNode.AddObserver(sliceNode.CustomActionEvent1 (DOES NOT EXIST), GenericCallbackFn)

---

_[View the full topic](https://discourse.slicer.org/t/event-on-double-right-click-in-a-given-view/27486)._
