# Touchscreen and trackpad interactions

**URL:** <https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557>\
**Category:** Support\
**Tags:** feature\
**Created:** [July 12, 2019, 8:30pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557 "2019-07-12T20:30:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [July 12, 2019, 8:30pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/1 "2019-07-12T20:30:46Z")

</div>

Interaction with 2D and 3D views using touchscreen and MacOS trackpad is now included in the latest nightly release.

If anyone has a chance to try them and would like to give feedback or suggestions, it would be appreciated.

---

<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:** [July 12, 2019, 11:46pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/2 "2019-07-12T23:46:21Z")

</div>

@sunderlandkyl This works really well, thank you! Could you describe the list of new gestures supported? If you describe it here then I’ll add it to the [user interface documentation](https://slicer.readthedocs.io/en/latest/user_guide/user_interface.html).

**Note for Mac users:** Mac touchpad gestures are shown from 0:39.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [July 13, 2019, 1:26pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/3 "2019-07-13T13:26:20Z")

</div>

> [@Sunderlandkyl](#):
>
> If anyone has a chance to try them and would like to give feedback or suggestions,

I could not get it working on a touchpad on Linux. I used both Slicer nightly from your repository, and Slicer home built with unaltered code. The build machine has Qt 5.12.4, and the work laptop has Qt 5.13.0.

Commit 8f4af3d7596 states ‘_If slice intersection is visible_’. Even when slice intersection is visible, with any combination of crosshair, I could not get ‘rotate’ to work on a touchpad. I don’t have a touchscreen to test.

Can you elaborate on exact steps to follow ? Thanks.

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [July 13, 2019, 2:29pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/4 "2019-07-13T14:29:59Z")

</div>

The list of supported gestures are:

# Windows

## Touchscreen

- 3D View:

- 2D View:

# MacOS

## Trackpad

- 3D View:

- 2D View:

# Linux

Untested. Probably some touchpad gestures work. Touchscreen may require configuration tuning (setting environment variables, etc.).

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [July 13, 2019, 2:41pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/5 "2019-07-13T14:41:06Z")

</div>

The interactions only work for trackpads that recognize gestures, such as the MacOS trackpad.  
Other platforms (only tested windows) don’t support the use of the pinch/pan/rotate gestures with the trackpad.

If you have a debug build, you can try placing a breakpoint [here](https://github.com/Kitware/VTK/blob/master/GUISupport/Qt/QVTKInteractorAdapter.cxx#L373) to see if the gestures are received by Qt at all.

---

<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:** [July 13, 2019, 3:19pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/6 "2019-07-13T15:19:02Z")

</div>

Windows and Linux only supports basic multitouch gestures on the touchpad (tap, click-and-drag, zoom, scroll), and pinch/rotate/pan only supported on the touchscreen. We have not tested touchscreen on Linux, but if multitouch is supported at operating system, driver, and Qt levels, then it should work in Slicer.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [July 13, 2019, 3:45pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/7 "2019-07-13T15:45:49Z")

</div>

> [@lassoan](#):
>
> Windows and Linux only supports basic multitouch gestures on the touchpad

I guess that’s the problem. I recompiled with Qt 5.13.0 and it does not work as expected. In 3D, only zooming works, and in 2D, only scrolling. Tested on two laptops, both running Linux/KDE. Rotating in 2D would have been useful to me. I’ll research touchpad specifics on Linux, and post here if anything interesting comes up.

Regards.

---

<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:** [July 13, 2019, 4:41pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/8 "2019-07-13T16:41:09Z")

</div>

Note that you can rotate slice intersections with basic gesture, too: using Ctrl+Alt+Left-click-and-drag.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [July 13, 2019, 5:41pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/9 "2019-07-13T17:41:19Z")

</div>

Yup, I can’t believe I missed that for so long. I usually tinker with the reformat widget for the same result. It’s just quicker and precise this way.

By the way, I could not find a simple and decent soulution for enhanced touchpad gestures on Linux.

Thank you very much for this tip.

---

<div class="post-metadata">

**Author:** ![apparrilla](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/apparrilla/32/9230_2.png) [@apparrilla](https://discourse.slicer.org/u/apparrilla)\
**Post date:** [May 8, 2024, 9:39pm UTC](https://discourse.slicer.org/t/touchscreen-and-trackpad-interactions/7557/10 "2024-05-08T21:39:19Z")

</div>

Hi everyone!  
Is there any advance in Linux touchscreen gestures?

I´m trying to run 3DSlicer in a i5 all-in-one pc with touchscreen but without mouse or keyboard.  
2 finger zoom/drag is full functional in Slicer Views but not in 3dViews.  
Is there any way to fix it?

Thanks in advance!
