Slaptop is a modern Apple-silicon remake of Kalani Helekunihi's 2005 utility. A left-side tap moves one Space left, a right-side tap moves one Space right, and a top-edge tap launches Mission Control. A "Tap direction" setting offers Natural (default — move toward the tapped side) and Inverted (the classic push-the-content mapping). The default Mission Control shortcuts are ⌃←, ⌃→, and ⌃↑. Users who changed those system-wide shortcuts can enter their matching bindings under Settings → Space Mapping. Custom gesture patterns can also learn tap or knock codes elsewhere on the computer and use them to press a keyboard shortcut or type text.
The project website is available at slaptop.am.guru. Its dependency-free source lives in website/ and includes a browser port of the animation from Slaptop's About screen, plus the project Privacy Policy and Terms of Service.
- Any Apple Silicon device with an integrated screen: MacBook, MacBook Air, MacBook Neo, MacBook Pro, or iMac
- macOS 14 or later
- Xcode 16 or later
- A development signing team for the privileged launch daemon workflow
The AppleSPU sensor is not exposed through a public macOS framework. Slaptop therefore includes a narrowly scoped, user-approved launch daemon that enables motion reporting, reads those reports, and sends impact features only to a code-signed Slaptop client. It has no file or network access logic.
- Generate the Xcode project:
xcodegen generate - Open
Slaptop.xcodeproj. - Select the
SlaptopandSlaptopSensorDaemontargets and choose the same Development Team under Signing & Capabilities. - Build the
Slaptopscheme. - Copy the built app to
/Applicationsbefore enabling its sensor service. Service Management expects the signed app bundle and its helper to remain at a stable location.
Slaptop intentionally refuses to perform Mission Control actions unless its resolved bundle path is exactly /Applications/Slaptop.app. Unit tests may run from Xcode's DerivedData location, but functional sensor and Space-switching tests must use the installed build. This keeps the privileged sensor workflow tied to the canonical installed application.
On a fresh or reset macOS Background Task Management database, SMAppService may initially report the bundled daemon as not found. Slaptop verifies the signed-in-bundle plist and executable itself, treats a complete payload as not yet registered, and lets register() return the real Service Management error if registration fails.
On a fresh install, Slaptop opens a one-time setup window with its About animation and requests sensor helper approval:
- Drag Slaptop onto the Applications shortcut in the disk image, then open the installed copy. If it is opened from the disk image first, setup warns that the app is not running from the
/Applicationsfolder and offers to copy and reopen it automatically. macOS cannot register the privileged helper from the disk image's transient/Volumespath. - Background Item approval for the bundled sensor daemon in System Settings > General > Login Items.
The setup window shows a green checkmark when macOS grants sensor access. Travel Spaces completes the setup and enables Slaptop after the sensor helper is approved. Existing users with a saved enable/disable preference are not shown onboarding retroactively.
Slaptop switches Spaces and opens Mission Control by synthesizing the configured Mission Control shortcuts, which requires granting Slaptop Accessibility access. The defaults are ⌃←, ⌃→, and ⌃↑; each binding can be changed to match a user's system-wide Mission Control settings. Direct manipulation of managed Spaces through the private SkyLight API was evaluated but only updates WindowServer's current-space record on modern macOS without compositing the change on screen.
Slaptop synthesizes one of these Mission Control and Spaces shortcuts only in response to a detected tap or its adjacent Test button. It never moves, warps, clicks, or otherwise takes control of the pointer. The bindings are stored locally in UserDefaults and can be restored together from the button beside Tap Direction.
Open Settings from the menu bar, choose Learn Left, and tap the left side of the display three times. Repeat with Learn Right and Learn Top. Calibration is stored locally in UserDefaults and can be reset at any time.
Learning uses the thresholds currently selected by the sensitivity slider and accepts a sample when either the acceleration or the rotation threshold is crossed. Left and Right training accept only yaw-dominant motion, and the two sides must rotate in opposite directions — the sign itself is learned from your taps because it varies by model and display angle. Top training accepts only pitch/roll-dominant motion. Wrong-direction, directionless, and below-threshold impacts leave training progress unchanged and are explained inline in Settings. The button press itself is also ignored during a short arming delay.
Tap detection is edge-triggered — an impulse must rise out of quiet motion, so sustained movement fires at most one action — with a configurable 333–1,000 ms interval to prevent one physical tap from switching multiple Spaces while allowing up to three intentional taps per second. The sensitivity slider adjusts the required motion impulse from 0.05 g (gentle) to 0.50 g (firm), with a 0.29 g default.
Choose Show Sensor Data in Settings to see rolling accelerometer, gyroscope, and dynamic-impact graphs. The impact graph draws the active detection threshold and reports each accepted tap, making it possible to distinguish missing sensor reports from a threshold that is too firm for a particular MacBook.
The bottom of Settings contains Custom gesture patterns. Add a named pattern, choose a keyboard shortcut or text action, and perform the complete tap or knock pattern three times. A quiet pause ends each sample. All three samples must contain the same number of impacts; Slaptop learns both their motion signatures and the rhythm between them, and asks for a repetition again when it is inconsistent.
Patterns and actions are stored locally in UserDefaults and can be edited, relearned, tested, or deleted. There is no fixed pattern-count limit. When patterns are configured, sensor impacts are collected at the fastest supported interval so their rhythm remains observable, while the user's ordinary Space-action debounce remains unchanged.
Slaptop: Developer ID app with a native AppKit status menu, SwiftUI settings/about windows, persisted activation preference, privileged sensor helper, GitHub updater, calibration, classification, and direct Mission Control action dispatch.SlaptopAppStore: sandboxed Mac App Store evaluation target with no updater or privileged helper. It reads AppleSPU reports in-process using a narrowly scoped temporary IOKit exception.SlaptopSensorDaemon: root launch daemon registered withSMAppService; reads accelerometer and gyroscope HID reports.Shared: the small Foundation XPC protocol shared by both processes.
Slaptop checks this repository's GitHub releases for new versions — daily by default, configurable to weekly or manual-only in Settings → Software updates, with a "Check Now" button. When a newer build is found, Slaptop downloads the release Slaptop.dmg, verifies that the contained app is signed by this project's Developer ID team before replacing anything, installs it into /Applications, and relaunches.
"Couldn't communicate with the helper application." — macOS's Background Task Management database still expects a previous build of Slaptop's sensor helper, so launchd kills the updated helper the moment it launches. This can happen after updating Slaptop (the helper binary changes with every release). Slaptop repairs this automatically when you enable it; if the message persists:
- Open Settings → Sensor service → Repair Sensor Service.
- If macOS asks, re-approve Slaptop under System Settings → General → Login Items & Extensions → Allow in the Background.
- Still stuck? Toggle Slaptop off and on in that same Login Items list, then enable Slaptop again. On some macOS releases (observed on the macOS 26/27 betas) this toggle — or a restart — is the only thing that clears the stale launch constraint: Background Task Management keeps the constraint from the original approval even after a clean re-registration, so Slaptop's automatic repair detects this state and opens the Login Items pane with instructions.
- Last resort:
sudo sfltool resetbtmresets the Background Task Management database (this affects other apps' background items too — they will need re-approval), then reboot and enable Slaptop.
Note this state lives in Background Task Management, not in TCC/privacy permissions — the Accessibility grant for Space switching is unaffected and does not need to be re-granted.
The sensor path relies on undocumented macOS interfaces, so it may change in future hardware or macOS releases. The sandboxed App Store target is suitable for TestFlight/App Review evaluation but still carries public-API review risk; see the Mac App Store investigation. A Developer ID build should be hardened, notarized, and tested on every supported MacBook family before distribution.
Pushes to main can be built and released by the AM-Guru macOSvm self-hosted GitHub Actions runner. The release job keeps signing and App Store Connect material in encrypted GitHub Secrets, imports the certificate into an ephemeral keychain, and publishes a notarized Slaptop.dmg with a branded drag-to-install layout containing Slaptop.app and an Applications shortcut. See GitHub release configuration for the required protected settings.
See THIRD_PARTY_NOTICES.md for sensor-research attribution.
I am open to bug fixes and pull requests from the community. If you find a problem or have a suggestion, please open an issue or pull request—I am very happy to review it and include community improvements that fit the project.
Slaptop is an open-source project licensed under the MIT License. Within the MIT License's very broad permissions, you are free to use, copy, modify, merge, publish, distribute, sublicense, sell, or otherwise build on this work for personal or commercial purposes.
The MIT License requires copies and substantial portions to retain its copyright and permission notice. Beyond that legal notice requirement, if you use or adapt my work, I ask that you credit Kalani Helekunihi and link back to the Slaptop repository when practical.
The AppleSPU device identifiers and report layout are based on research from olvvier/apple-silicon-accelerometer. Its separate MIT copyright and permission notice is preserved in THIRD_PARTY_NOTICES.md and must remain with distributions containing that material.