Skip to content

huanglizhuo/Flappy.Lid

Repository files navigation

Flippy Lid Icon

💻 Flippy Lid 🦅

The first productivity tool powered by your hinge!
Built with SwiftUI + Private IOKit Sensors + Pure Chaos

macOS ARM Only License

English | 中文


🧐 What is this sorcery?

Flippy Lid turns your MacBook's lid into a physical input controller. Yes, really.

By tapping into the hidden hinge angle sensors (via some dark IOKit magic 🧙‍♂️), we detect when you open or close your laptop. We then translate those physical "flaps" into digital actions.

It's the only app that gives your hinge a workout while you procrastinate.


🌟 Features

1. 🎮 FLAPPY GAME

The classic game, but you control the bird by physically flapping your MacBook screen.

  • Open Lid = Flap Up
  • Risk Level: High (Please don't snap your screen)

Demo GIF

2. ⌨️ KEY SIMULATOR (Universal Controller)

Map your lid "flaps" to ANY keyboard key.

  • Map it to Space -> Play Chrome's Dinosaur Game physically.
  • Map it to W -> Walk forward in games by oscillating your screen.
  • The possibilities are endless (and ridiculous).

Demo GIF

3. 🔐 LID PASSWORD (James Bond Mode 🕵🏻‍♂️)

Automatically type a preset password when you perform a secret "Lid Handshake".

  • Trigger: Quickly open/close your lid 3 times.
  • Action: Type the preset password in any input box.
  • Cool Factor: 11/10 when done in a coffee shop.

Demo GIF

4. 💡 Got more wild ideas?

Open an issue here or just fire off a PR!


💡 The "Science"

This project stands on the shoulders of giants (and reverse engineers):

  • The Sensor: MacBooks have Hall Effect sensors or similar mechanisms to detect lid angle for sleep/wake. We read the raw data from IOHIDDevice.
  • The Pioneer: LidAngleSensor by Sam Henri Gold. He did the hard work of finding the magic IOKit keys.
  • The Spark: Directed by this tweet from @rebane2001, who wisely asked: "Can I jump by flappy my foldable device?"

⚠️ Warning: Read Before Flapping

Warning

USE AT YOUR OWN RISK.

  1. Hinge Health: Your MacBook hinge is designed for gentle adjustments, not high-frequency flapping. We are not responsible if your screen becomes floppy.
  2. Social Awkwardness: Using this app in public will make people stare at you. Embrace it.
  3. Compatibility:
    • ARM Macs Only: Specifically designed for M1/M2/M3 MacBooks. Intel Macs use different sensors (and are too hot to touch anyway).
    • Private APIs: We use private APIs. Apple could patch this loophole at any moment. Enjoy it while it lasts!

🎮🕹️👾 How to Play

Download the latest release from Releases and double-click the DMG file to install.

🛠️ How to Build

  1. Clone this repository.
  2. Open Flappy.Lid.xcodeproj in Xcode.
  3. Build & Run.
  4. Grant Accessibility Permissions (needed for Key Simulation).
  5. Start flapping! 🦅

Made with ❤️ and questionable judgment by Lizhuo

About

A system-level, lid-driven, event-loop-powered flappy bird.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors