Skip to content

DroidBridge 0.1: Mac mouse, keyboard and clipboard on Android - #1

Merged
beyondlevi merged 11 commits into
mainfrom
feature/mvp
Oct 7, 2026
Merged

beyondlevi merged 11 commits into
mainfrom
feature/mvp

Conversation

@beyondlevi

Copy link
Copy Markdown
Owner

What

First version of DroidBridge: use the Mac's mouse and keyboard on an Android device over USB, with the text clipboard shared both ways. Mac only for now.

  • Android side (server/): a small server started over adb as the shell user (no app to install). It creates a UHID mouse and keyboard, so Android draws its own pointer and treats keys like a physical keyboard. It also syncs the clipboard and sets the keyboard layout to match the Mac's (Android 15+). It vendors the unmodified scrcpy 4.1 server sources (Apache-2.0, see NOTICE).
  • Return to the Mac: Android accelerates the relative mouse, so the server reads the pointer position from the input service dump (~20 ms). It only does this while the pointer moves toward a stretch of edge that leads back.
  • Mac app (mac/): a Swift menu-bar app with:
    • a CGEventTap that swallows input while on Android;
    • an adb link with reconnection;
    • an Arrange Screens window: drag the device against one or two displays, and each touched stretch of edge becomes a passage;
    • pointer speed and ⌘-as-Ctrl settings;
    • a fix for ' + c (ç) on US International;
    • English and pt-BR strings;
    • an app icon and a menu-bar glyph.
  • Docs: README, docs/architecture.md, protocol/README.md. CI workflow build.yml.

Why

An open-source alternative to DeskDock PRO for macOS.

Tested

  • swift test: 28 unit tests (wire protocol, multi-display edge geometry, key map, layout map, cedilla fix).
  • On a Galaxy Z Fold (Android 17) with a Mac running macOS 26 and two displays, the following were tested by hand and confirmed working:
    • crossing in and back out through the edge, including from both displays with the device in the corner between them;
    • move, click, scroll and typing;
    • accents and ç;
    • clipboard in both directions;
    • the ⌃⌥⌘B hotkey.
  • tools/devtest.py covers entering and returning through the edge on the device.

Risks / not covered

  • USB only. Wi-Fi, file drag-and-drop, the Fold's cover display and screen rotation are not handled yet.
  • Hiding the cursor brings the app to the front while the pointer is on Android, and gives focus back on return.
  • Keyboard layout sync needs Android 15+.
  • The first CI run happens on this PR: it sets up the Android SDK on a macOS runner.

🤖 Generated with Volund OS

beyondlevi and others added 11 commits October 7, 2026 10:28
…dored)

Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
…oard sync, adb link)

Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
…, local signing identity

Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
…ssage)

Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
…ard layout follows the Mac

Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
…creens and layouts

Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
…rn stretches per side, ç fix for US International

Co-Authored-By: Volund OS <287815646+volundos[bot]@users.noreply.github.com>
@beyondlevi
beyondlevi merged commit f29bc69 into main Oct 7, 2026
1 check passed
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.

1 participant