He turned his AirPods case into a mouse in one evening with Claude Code, without writing a line of Swift
X user @_Aquarelle says he and Claude Code built a small Swift menu-bar app for his MacBook that turns his AirPods case into a pointer. Pointing the case moves the cursor, tapping the lid clicks, a double tap double-clicks, tapping the side right-clicks, and tilting and holding scrolls. His first version was too jumpy because his hand shakes slightly, so he asked Claude to add smoothing and a dead zone, and now he closes tabs from the couch three meters away. He says he described what he wanted, broke it, complained, and let Claude fix it until it worked.
Why it matters
It's a fun example of how far 'describe it, test it, complain' can go with a coding agent, even for low-level input handling in a language you don't know. Smoothing and dead zones are the kind of fixes that used to need an expert.
Who it's for
Mac tinkerers and hobbyists who want to build small hardware-input hacks without knowing Swift.
How to try it
- Ask Claude Code to scaffold a Swift menu-bar app that reads motion or tap input from a device you own and logs it.
- Map the inputs to cursor movement, clicks and scrolling one at a time, and test after each change.
- If it's jittery, ask for smoothing and a dead zone.
- Grant only the macOS accessibility permissions the app actually needs.
Plan & availability: A personal project, not a released app. Needs Claude Code on a plan that includes it and a Mac with AirPods. He hasn't said exactly how the app reads the case's movement, so your results may vary.
Note: reported by users on X; we haven't independently confirmed it works in the current version.
Source: @_Aquarelle on X
Written by Sarah Mitchell from the original post. Checked Nov 5, 2026. Features, plans and availability can change, so confirm on the source before you rely on it.
claude-codeswiftmacoshardware-hack
More Claude tricks
- One URL and one key for all your MCP servers: ngrok's MCP Gateway is live · Dec 2
- OpenCode 2.4.2 cuts about 700 tokens per request and tunes GPT-6.2 · Nov 26
- OpenCode 2.4 gives your coding agent a browser, automations, and video generation · Nov 24
- Claude Code 2.1.330 draws your charts with easel and lets scheduled tasks run 30 days · Nov 21