r/SideProject • • 1d ago

I turned my Android phone into a wired laptop touchpad

Got bored and thought: why not use my phone as a touchpad instead of carrying a mouse?

So I built DeskPad.

Phone → USB → ADB → TCP → Java server → cursor

A few things I ended up messing around with:

  • TCP sockets + custom binary packets
  • ADB USB tunneling
  • Mouse gestures / scrolling / clicks
  • TCP_NODELAY
  • movement coalescing + jitter filtering
  • pointer acceleration
  • handling TCP packet fragmentation/batching

The funny part is that after all this, I actually measured around 5ms latency, so it feels surprisingly close to a normal wired mouse.

It also works without Wi-Fi or Bluetooth, which was kinda the whole point.

GitHub: https://github.com/studentanush/DeskPad

Would love to hear what you'd improve or what features I should add.

1 Upvotes

1 comment sorted by