Back to Writing
·2 min readTech

I turned my MacBook hinge into a CAPTCHA experiment

by Keiryan Wilson

I saw a post (opens in a new tab) from Ben Nisevich (opens in a new tab) about a project his team built at the Bitrig x Y Combinator hackathon: a CAPTCHA-style challenge that asks you to physically fold a device to a particular hinge angle.

The idea caught my attention. A browser agent can inspect a page and interact with the controls on it. Moving the hardware itself asks for a different kind of interaction.

And a MacBook is a folding device, too.

So I jumped into Codex and built a Mac version of the experiment.

Reading the hinge

The starting point is the MacBook's built-in lid-angle sensor. On compatible hardware, it provides more information than whether the laptop is open or closed. You can read the angle of the display as it moves.

In the video, I connect the reader and move my MacBook's screen by hand. The number on the page changes along with it. That's the input for the challenge.

The project supports two ways to read the sensor: direct browser access through WebHID, or a local Swift helper that reads it through IOKit. The recorded demo uses the native reader.

Direct browser mode needs a browser such as Chrome or Edge. Safari can use the locally served page with the native helper. Hardware support is a separate question: having a MacBook doesn't automatically mean the particular sensor interface this demo expects is available.

Turn the reading into a challenge

Once the reader is connected, the app gives you three target angles. You move the screen to each one and hold near the target while the app checks the incoming readings.

The video shows me working through the targets and reaching the “Challenge completed” screen. It's a very literal way to turn something physical into an input for a web page.

I also got a name for the project along the way: Hinge. Codex came up with that. A little on the nose, but it works.

What this experiment proves

My original post described the physical action as proof that a real human was there. That claim needs a qualification.

This demo adds a physical obstacle for an agent limited to ordinary browser interaction. It doesn't establish secure, remote proof of humanity. Someone who controls the client can change the JavaScript or the claims it sends. Neither the browser reader nor the native helper produces a cryptographically signed hinge measurement.

So this is a physical-interaction experiment, with real sensor readings and a deliberately clear security boundary. A completed local challenge shouldn't be treated as a security guarantee.

I also said in the video that I hope moving our laptop screens doesn't become a normal part of browsing the web. I don't particularly want to fold a device every time I encounter a CAPTCHA. It was still a very cool idea to build on.

Credit to Ben and his teammates for the original inspiration, and congratulations on their top-six finish. The repository also credits TANG617's LidPerspective and samhenrigold's LidAngleSensor for the sensor research that informed the implementation.

The demo and source are linked below if you want to explore it. If you try it on compatible hardware, move the screen gently within its normal range.

Project links