Better Touchscreen Support
Description
This PR adds support for gestures. Allows touchscreen input to move the cursor, scroll, select, and open the context menu.
Gestures
- When scrolled to the end of output (or mouse-tracking enabled),
- Two-finger right-swipe: Tab
- Two-finger left-swipe: Escape
- Single-finger pan: Arrow keys
- Not scrolled to the end,
- Vertical, single-finger pan: Scroll up and down
- Horizontal, single-finger pan: Select
- Any scroll,
- Two-finger pan: Vertical scroll
- Long tap: Right click
- Short, 1-finger tap: Left click
- Short, 3-finger tap: Middle click
- Short tap, drag: Left-button down, move, end mouse event.
To-do
-
Tests -
Kinetic scrolling -
Drag and drop on long tap -> drag -
Dolphin-like right-click indicator
Screencasts
Notes
- Initially, I tried to use QGestureRecognizer. Unfortunately, it only recognized two-finger gestures.
- It might be helpful to compare this PR to this PR that improved touch support in Dolphin.
- The code is currently somewhat messy...
Edited by Nate Graham