Magic Switch: Share a Magic Keyboard & Trackpad Between Two Macs (Free)

TL;DR: Magic Switch is a free, open-source macOS app for sharing an Apple Magic Keyboard, Trackpad, or Mouse between two Macs — with no Apple ID and no USB re-pairing dance. Source on GitHub .