Genymobile / Genymobile/scrcpy

Gesture support for trackpad users

Open
#4,495 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
150k
Forks
13.8k
Avg merge
4d 13h
Merged PRs (30d)
2

Description

  • [*] I have checked that a similar feature request does not already exist.

Is your feature request related to a problem? Please describe.
Gesture support kinda sucks. I understand why it sucks, in that scrcpy needs a minimum requirement of one mouse button to function, but for laptop users it's really frustrating to be able to use Android-like gestures in basically any app except scrcpy.

Describe the solution you'd like
Gestures like zoom, rotate, etc. that are recognized by the host OS result in appropriate inputs to the Android app. I haven't researched APIs but I can think of at least three possible solutions:

  1. Create a virtual trackpad-like input device. I think, but not certain, this is how the Android emulator works with this trackpad. Dex also works with this trackpad (and is better supported I believe), but this is done with I'd assume a real driver.
  2. Android might have an abstraction input layer which would make this even simpler.
  3. Simulating screen gestures like scrcpy does currently.

In MacOS you can track contact position on the trackpad and thus potentially map it 1:1. This is how Magic Trackpad behaves in Dex (although in Dex you have to put the trackpad in portrait mode, which would suck on a laptop for obvious reasons)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by investigating how scrcpy currently converts mouse input into Android input, then compare the proposed virtual trackpad, Android input abstraction, and simulated gesture approaches. Check host-OS gesture and trackpad APIs, including the macOS contact-position behavior described here. Done means supported trackpad gestures such as zoom and rotate produce the corresponding Android interactions without requiring a mouse button.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, c
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.