Skip to content

implementation of pinch gestures#19963

Open
kefaslungu wants to merge 3 commits intonvaccess:masterfrom
kefaslungu:pinchgestures
Open

implementation of pinch gestures#19963
kefaslungu wants to merge 3 commits intonvaccess:masterfrom
kefaslungu:pinchgestures

Conversation

@kefaslungu
Copy link
Copy Markdown
Contributor

Link to issue number:

#19938

Summary of the issue:

This PR adds pinch in and pinch out gestures as the first step toward expanding NVDA's touch gestures. See #19938 for more information.

Description of user facing changes:

Two new touch gestures are now available for assignment:

  • Pinch in: place two fingers on the screen and move them toward each other.
  • Pinch out: place two fingers on the screen and move them away from each other.

The fingers must move at least 50 pixels closer together or further apart to be recognised as a pinch.

Description of developer facing changes:

Description of development approach:

The pinch gesture is detected entirely within TrackerManager in touchTracker.py.
When two fingers are on screen simultaneously, the initial distance between them is recorded.
When both fingers lift, the final distance is computed from their last known positions.
If the change in distance meets or exceeds the minimum threshold, a pinch in or pinch out MultiTouchTracker is queued and emitted like any other gesture.

Testing strategy:

To test, you must have a touch environment, and must be able to:

  • Build from source and
  • self sign the build.
    Or get the snapshot
  1. Build NVDA from the pinchgestures branch and enable touch interaction support.
  2. Turn on input help mode (NVDA+1).
  3. Place two fingers on the screen and move them toward each other — NVDA should announce "2 finger pinch in".
  4. Place two fingers on the screen and move them away from each other — NVDA should announce "2 finger pinch out".
  5. Assign a script to each gesture via the Input Gestures dialog and confirm the script executes correctly.
  6. Verify that single-finger gestures are unaffected.
  7. Verify that a two-finger tap is still recognised correctly and not confused with a pinch.

Known issues with pull request:

None.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
Signed-off-by: kefaslungu <jameskefaslungu@gmail.com>
@kefaslungu kefaslungu requested a review from a team as a code owner April 16, 2026 15:08
@kefaslungu kefaslungu requested a review from SaschaCowley April 16, 2026 15:08
@kefaslungu kefaslungu requested a review from a team as a code owner April 16, 2026 15:09
@kefaslungu kefaslungu requested a review from Qchristensen April 16, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants