# Custom InteractorStyle for View2DProxy

**URL:** https://discourse.vtk.org/t/custom-interactorstyle-for-view2dproxy/11188
**Category:** Support
**Created:** [April 12, 2023, 12:34pm UTC](https://discourse.vtk.org/t/custom-interactorstyle-for-view2dproxy/11188 "2023-04-12T12:34:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![maya](https://discourse.vtk.org/user_avatar/discourse.vtk.org/maya/32/6875_2.png) [@maya](https://discourse.vtk.org/u/maya)
#### Post date: [April 12, 2023, 12:34pm UTC](https://discourse.vtk.org/t/custom-interactorstyle-for-view2dproxy/11188/1 "2023-04-12T12:34:03Z")

</div>

Hi, I’m trying to implement a custom InteractorStyle based on the InteractorStyleManipulator to enable manipulators to be activated on different key bindings from the provided configurations (namely the spacebar). I’m using a View2DProxy and setting the InteractorStyle through its interactor enables access to manipulators I set manually, but not to the MouseRangeManipulator created by the ViewProxy.

```auto
const interactor = viewProxy.getInteractor();
const customInteractorStyle = CustomInteractorStyle.newInstance();
interactor.setInteractorStyle(customInteractorStyle);

const zoomManipulator = vtkMouseCameraTrackballZoomManipulator.newInstance({
  scrollEnabled: true,
  dragEnabled: false,
  alt: true,
});

const panManipulator = vtkMouseCameraTrackballPanManipulator.newInstance({
  dragEnabled: true,
});

customInteractorStyle.addMouseManipulator(zoomManipulator);
customInteractorStyle.addMouseManipulator(panManipulator);

```

If I create a new MouseRangeManipulator and add it to the customInteractorStyle, it doesn’t have properly configured `verticalListener` and `horizontalListener`. I can see that these are set in View2DProxy and that there the rangeManipulator is added to the model’s `interactorStyle2D`.

How can I access this specific and pre-configured rangeManipulator in my customInteractorStyle? Otherwise, how can I defer to the View2DProxy’s interactorStyle2D for handling the rangeManipulator?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [April 12, 2023, 6:53pm UTC](https://discourse.vtk.org/t/custom-interactorstyle-for-view2dproxy/11188/2 "2023-04-12T18:53:22Z")

</div>

Ideally it should be exposed but for now you can do

```js
const { rangeManipulator } = viewProxy.get('rangeManipulator');

```
