Posted inApps / Open Source

MacTap: Turn Your MacBook Into an Extra Input Device

MacTap artwork illustrating a finger tapping a MacBook chassis, with orange vibration waves incorporating the FSM logo.

Back in 2013, we covered an app called Knock that allowed you to unlock your Mac by knocking twice on your iPhone. Here’s a different take on that idea. What if you could assign shortcuts to knocks on the MacBook itself?

That’s exactly what MacTap, a free and open source app that sits in your menu bar, allows you to do. And you don’t even have to touch the trackpad.

MacTap makes use of the accelerometer built into compatible Apple Silicon MacBooks. Every time you knock on the aluminum next to your trackpad, for example, there’s a tiny change in acceleration that the sensor can pick up. The app filters the motion data and looks for the sudden changes that resemble knocks. It can also read the gyroscope if available, although it’s the accelerometer that it uses to detect the knocks.

Affiliate promotion. FSMdotCOM may earn a commission.

AdGuard Black Friday 2026: 50% off annual plans and 45% off all plans.

By default you get three gestures: a single, double and triple knock. You can also switch from Anywhere to Left & Right mode and get six gestures (three on each side of the MacBook). Of course, the aluminum isn’t actually touch sensitive. The app works out which side you’ve knocked on based on the direction of the initial movement, so it won’t necessarily get it right every time. You can even experiment with knocking on the desk your MacBook sits on.

MacTap single, double and triple knock gestures with examples of assignable actions.

So what do you assign to those gestures? Let’s say you’re listening to music while working on your MacBook. You could knock twice to pause or resume playback and three times to skip to the next track. Or just assign a knock to take a screenshot if you’re tired of reaching for three keys to do it.

There are five presets to choose from (Daily, Coding, Capture, Media and Focus) but you can also assign your own keyboard shortcuts, open apps and URLs, run shortcuts from Apple’s Shortcuts app, execute shell commands and run AppleScripts.

What’s nice about MacTap is that you can set up different actions for different apps. For example, a double knock could open a new tab in your browser and pause your music when you’re working in another app.

MacTap Daily, Coding, Capture, Media and Focus presets with examples of application specific actions.

A quick note about the image above: by default Cursor gets Accept, Reject and Save, while Claude only gets Accept and Reject. The third gesture in Claude retains whatever action you’ve assigned to it globally.

Now, there’s quite a difference between pressing a key on your keyboard and knocking on your MacBook. The sensor will pick up movement whether you’ve knocked on purpose, bumped the desk or moved the laptop. MacTap tries to filter out accidental knocks, including vibrations from typing. You can adjust the sensitivity, change how long it waits for consecutive knocks and invert the sides if the app gets them wrong. And yes, a single knock comes with a slight delay because the app has to wait to see if there’s a second one coming.

Before you start assigning shell commands to knocks, try something like the media controls. Accidentally pausing a song is one thing. Accidentally accepting a suggestion from an AI coding assistant is a different story. Check the rules for Cursor and Claude as well. Accept and Reject in MacTap simply send Return and Escape, regardless of what those keys will actually do in the app at that moment.

MacTap processes the motion data locally and saves its settings and gesture counts in macOS preferences. To simulate keyboard shortcuts it needs Accessibility or permission to post keyboard events. It may also request Automation access to System Events, and there’s an optional Input Monitoring permission to help it ignore knocks while you’re typing. The app isn’t sandboxed. And, of course, whatever shell commands or Apple Shortcuts you assign can still access files or connect to the internet.

As long as detection is enabled, MacTap listens to the sensor in the background. You can turn detection off and you can also set the app to start at login. How much of an impact this has on battery life is something we haven’t measured.

Will it work on your MacBook?

You’ll need macOS 14.6 or newer and a MacBook with a compatible accelerometer. According to the developer, that includes MacBooks with M2 chips or newer, as well as M1 Pro and M1 Max models. If you’ve got an original M1 MacBook Air, you’re out of luck. Some other M1 models are also unsupported. MacTap relies on an undocumented Apple SPU HID interface to access the sensor, so there’s no guarantee that a future macOS update won’t break it.

If you’re curious about what else you can do with that sensor, check out this Apple Silicon accelerometer project. It’s interesting that there’s hardware in your MacBook that, with a bit of software, can give you an entirely new way to interact with the machine.

To download MacTap, check out the releases page on GitHub. The app is available as a ZIP (recommended by the developer) or a DMG. Just move it to your Applications folder. If you’d rather build it yourself, the source code is available under the MIT license.

Support FSMdotCOM on Liberapay