README.md
Turn your MacBook's trackpad into a precise digital weighing scale
TrackWeight is a macOS application that transforms your MacBook's trackpad into an accurate weighing scale by leveraging the Force Touch pressure sensors built into modern MacBook trackpads.
https://github.com/user-attachments/assets/7eaf9e0b-3dec-4829-b868-f54a8fd53a84
To use it yourself:
TrackWeight utilizes a custom fork of the Open Multi-Touch Support library by Takuto Nakamura to gain private access to all mouse and trackpad events on macOS. This library provides detailed touch data including pressure readings that are normally inaccessible to standard applications.
The key insight is that trackpad pressure events are only generated when there's capacitance detected on the trackpad surface - meaning your finger (or another conductive object) must be in contact with the trackpad. When this condition is met, the trackpad's Force Touch sensors provide precise pressure readings that can be calibrated and converted into weight measurements.
brew install --cask krishkrosh/apps/trackweight --force
TrackWeight.xcodeproj in XcodeFor more information about setting up the build pipeline, see .github/workflows/README.md.
The weight calculations have been validated by:
It turns out that the data we get from MultitouchSupport is already in grams!
The application is built using:
This project relies heavily on the excellent work by Takuto Nakamura (@Kyome22) and the Open Multi-Touch Support library. The library provides:
This project is licensed under the MIT License - see the LICENSE file for details.
This application is for experimental and educational purposes. While efforts have been made to ensure accuracy, TrackWeight should not be used for critical measurements or commercial applications where precision is essential. Always verify measurements with a calibrated scale for important use cases.