Launching today

Knock
Knock on your MacBook to control your Mac
125 followers
Knock on your MacBook to control your Mac
125 followers
Knock turns taps on your MacBook into instant actions. Switch tabs, change desktops, play/pause music, open apps, run custom scripts, or take screenshots - all with a simple knock. Tap the desk beside your laptop or knock on the MacBook’s chassis (not the trackpad). Knock uses the built-in accelerometer in Apple Silicon MacBooks to trigger customizable shortcuts.





Knock
@will_gee1 This innovation looks fun as hell. Can you reveal more about the technical part of Knock? How does it work? How did you make this possible? Can the mac get damaged in the long-term by trying to use it in a non-intended way? (this last one is really silly, but I wanna know lol)
Knock
@dingleberryjones Thanks! Modern MacBooks have a built-in accelerometer, which is essentially a motion sensor that can detect small changes in movement and vibration. Knock reads that motion data and looks for very short impulse spikes that match the pattern of a tap on the laptop chassis or the desk it's sitting on.
Those spikes are then interpreted as gestures (single, double, or triple knocks), which trigger whatever action the user has assigned.
A big part of building it was filtering the signal properly so it ignores normal movement or keyboard vibration. There’s a sensitivity slider so people can tune it for their setup, and gestures are also temporarily suppressed while typing to prevent false triggers.
Knock isn’t doing anything unusual to the hardware. It’s just reading motion data from the sensor, similar to how other apps read system sensors.
Knock
@krisba95 Thanks! The detection sensitivity is adjustable with a slider so users can tune it depending on their setup (desk material, laptop position, etc.).
The detector also looks for very short impulse spikes rather than general vibration, and gestures are temporarily suppressed while typing to avoid triggers from keyboard vibration if sensitivity is set high.
I also added a Knock Test tool so people can see how their specific Mac reacts before using it.
Trufflow
This is actually really interesting! I didn't know that MacBooks could detect knocks! Other than the physical interaction aspect for Knock, are there features that Knock offers that others (like Raycast) doesn't?
Knock
@lienchueh Great question! The main difference is that Knock focuses on physical interaction with your Mac. Instead of using the keyboard or opening a launcher like Raycast, you can trigger actions just by tapping your MacBook. It’s meant to be a quick, hands-free layer on top of macOS for things like muting audio, pausing music, or triggering actions while you’re away from the keyboard.
Knock on your MacBook to control your Mac? My cat already does this—except it’s more like “paw aggressively at the hinge until something happens.” If this can distinguish between intentional knocks and feline percussion, you’ve solved the real edge case.
Knock
@lliora Haha that might actually be the toughest edge case to solve.
Knock tries to detect very short, sharp tap impulses rather than general movement, so in theory it should ignore most “feline percussion”… but if your cat learns the gestures before you do, I can’t take responsibility for what actions it triggers!
Wordwand
@will_gee1 This is one of those ideas that sounds like a gimmick until you actually think about the use cases. Tapping to play/pause while your hands are off the keyboard, or switching desktops without reaching for the trackpad mid-flow - that could genuinely become muscle memory fast.
The fact that you built a live sensitivity tuner shows you've thought about the real problem here, which isn't detecting a knock - it's not detecting everything else. How does it handle false positives in noisy environments? Like if I'm at a coffee shop and someone bumps the table, or if I'm typing aggressively - does the accelerometer distinguish between a deliberate knock pattern and ambient vibration?
Also curious whether you've considered double-knock or triple-knock as separate triggers. That would open up a lot more actions without overlapping.
Really creative use of hardware that's just sitting there unused. Following this one.
IMAI Studio
after using the cheat code came across this love the product
Knock
@sammy_xf Appreciate it! Glad you found it!