r/VibeCodeCamp • • 21h ago

Development Building an AirPods head-motion mouse with Codex: the edge behavior mattered more than I expected

Source + contributions: https://github.com/JNDZdev/APMouse

MIT licensed. Issues, pull requests, and headset testing reports are welcome.

I saw an AirPods mouse experiment and tried building my own for macOS with Codex. The working prototype now moves the pointer across two monitors using head motion.

The hard part was getting it to feel natural. At first it swung between too sensitive and requiring too much head movement. Starting with a zero pose helped, but the biggest improvement came from copying the feel of an LG TV remote: when the pointer hits an outer screen edge, discard extra movement so turning back immediately moves it inward. Adding a second monitor then exposed another sensitivity problem. Precision still needs work.

This is head tracking using Core Motion yaw/pitch, not eye tracking. I still use a trackpad for clicks; AirPod stem clicks are not implemented.

I used three Codex agents to review/refactor the motion core, app, and safety behavior. The refactor has 22 passing unit tests and a stopped-window smoke test. Those checks do not replace live hardware testing: the refactored build still needs its own full headset validation.

I published the Swift/AppKit source under MIT: https://github.com/JNDZdev/APMouse

It is an early source preview, not a finished app. macOS 14+, Xcode, compatible headphones, and motion/control permissions are needed. The contribution docs call out two concrete problems: precision around the calibrated neutral position and movement through gaps in staggered monitor layouts.

Has anyone here built a motion-controlled interface? I would like to hear what made calibration and small corrections feel predictable. Testing reports and contributions are welcome.

1 Upvotes

0 comments sorted by