Launching today

Knock
Knock on your MacBook to control your Mac
95 followers
Knock on your MacBook to control your Mac
95 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.
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!
IMAI Studio
after using the cheat code came across this love the product
Knock
@sammy_xf Appreciate it! Glad you found it!