Launching today

Knock
Knock on your MacBook to control your Mac
142 followers
Knock on your MacBook to control your Mac
142 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
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.
Knock
@diegodau Thanks Diego, really appreciate the thoughtful comment. You’re exactly right that the hard part isn’t detecting a knock, it’s filtering everything else. Knock looks for short vibration spikes that match the timing of a tap rather than general motion, which helps separate a deliberate knock from background desk movement.
It also temporarily pauses detection while you’re typing. There’s a 500ms suppression window after the last keystroke so aggressive typing won’t accidentally trigger gestures.
Sensitivity can also be tuned depending on the desk setup, and the Knock Test view lets you see the accelerometer waveform in real time so users can dial it in.
And yes, single, double and triple knocks are all separate triggers right now, so you can map different actions to each. I’m definitely interested in expanding the gesture system further as the app evolves.
Appreciate you following along!
@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.
Super creative use of the built-in accelerometer. How do you handle distinguishing between intentional knocks and vibrations from nearby objects, like someone else working at the same desk? Also curious if you plan to support custom gesture patterns beyond single, double, and triple knocks. Looks great!
Knock
@mcarmonas Thanks!
The tricky part was making sure it reacts to intentional taps but ignores everything else. Knock focuses on short vibration spikes that match the timing of a knock rather than general motion, which helps filter out background movement like someone shifting the desk.
It also pauses detection while you’re typing. There’s a small 500ms suppression window after the last keystroke so heavy typing doesn’t accidentally trigger gestures.
Users can also tune the sensitivity and watch the live waveform in Knock Test to see exactly what the accelerometer is picking up on their setup.
For now it supports single, double and triple knocks, but expanding the gesture system and timing options is definitely something I’m interested in exploring in future updates.
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!