# Disable shift-drag (translate) in TrackballActor interaction style

**URL:** https://discourse.vtk.org/t/disable-shift-drag-translate-in-trackballactor-interaction-style/13823
**Category:** Support
**Created:** [April 30, 2024, 5:01pm UTC](https://discourse.vtk.org/t/disable-shift-drag-translate-in-trackballactor-interaction-style/13823 "2024-04-30T17:01:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Charles\_G\_Waldman](https://discourse.vtk.org/user_avatar/discourse.vtk.org/charles_g_waldman/32/8813_2.png) [@Charles\_G\_Waldman](https://discourse.vtk.org/u/Charles_G_Waldman)
#### Post date: [April 30, 2024, 5:01pm UTC](https://discourse.vtk.org/t/disable-shift-drag-translate-in-trackballactor-interaction-style/13823/1 "2024-04-30T17:01:01Z")

</div>

While in “TrackballActor” interaction style, I would like to allow users to rotate objects around their centers, but not drag them out of position (shift-click), is there an easy way to achieve this?

---

<div class="post-metadata">

### Author: ![geoffw](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/g/898d66/32.png) [@geoffw](https://discourse.vtk.org/u/geoffw)
#### Post date: [April 30, 2024, 6:38pm UTC](https://discourse.vtk.org/t/disable-shift-drag-translate-in-trackballactor-interaction-style/13823/2 "2024-04-30T18:38:10Z")

</div>

You should be able to subclass the interactor and then override one of the event handlers - for example, override mousemove and if the shift key is pressed, skip the event. Otherwise pass it down.
