Genymobile / scrcpy

Display and control your Android device
Apache License 2.0
111.53k stars 10.69k forks source link

Simulate trackpad on OTG #4169

Open Jeffser opened 1 year ago

Jeffser commented 1 year ago

I think it would be better if scrcpy could detect if the user is using a mouse or a trackpad while using OTG and then send the input accordingly to the Android device, I think there are some exclusive gestures while using trackpads on Android but scrcpy doesn't have support for them.

I'm not sure if it's possible to send direct trackpad input through OTG but I think it would be cool if possible

nnnpa31 commented 1 year ago

I'm not sure if it's possible to send direct trackpad input through OTG but I think it would be cool if possible

It's possible. I even simulated the touch screen through it: go-accessoryhid descriptors.go#L74 Using the touch screen, you can click on the absolute position of the Android device's screen, not limited by the relative position of the mouse protocol.

So the point that needs to be addressed is this: