TrackWeight: Turn your MacBook's trackpad into a digital weighing scale

by wtcactuson 7/21/2025, 2:51 PMwith 148 comments

by benoauon 7/21/2025, 3:06 PM

There used to be iPhone apps that did something similar -

https://www.theverge.com/2015/10/28/9625340/iphone-6s-gravit...

by hn_throwaway_99on 7/21/2025, 3:19 PM

I think this is neat, but only in a Rube Goldberg machine sort of way. The instructions are:

1. Open the scale

2. Rest your finger on the trackpad

3. While mainting finger contact, put your object on the trackpad

4. Try and put as little pressure on the trackpad while still maintaining contact. This is the weight of your object

That is, the pressure sensors only work if it detects capacitance, so you need to be touching the track pad (but not too much!!) while weighing something.

by ivanjermakovon 7/21/2025, 5:53 PM

> TrackWeight utilizes 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.

How can something be available as a library but not as a native interface? Swift does not expose that API?

by incanus77on 7/21/2025, 3:57 PM

This reminds me of how, twenty years ago, I used the PowerBook’s hard drive vibration sensor to rig up a seismograph to measure construction noise:

https://allthegooddomainsweretaken.justinmiller.io/2007/04/0...

by mikpankoon 7/21/2025, 6:39 PM

Very cool. Curious: what is the minimum and maximum weight MacBook's trackpad can reliably measure this way?

by pmxion 7/21/2025, 3:29 PM

This is clever! and potentially useful too.

Have you done any testing to determine how precise and accurate this is? I suspect their must be a lot of variance between laptops, since this isn’t an intended use case.

by pavonon 7/21/2025, 7:51 PM

I love this, such a creative hack, and the wonderful irony that it only works when one has their finger on the scale.

* Not legal for trade outside of Ankh-Morpork.

by skybooon 7/21/2025, 11:22 PM

Reminds me of this from when I had an HDD Macbook https://uri.cat/software/LiquidMac/

by jordanmorgan10on 7/21/2025, 6:09 PM

Back when we had 3D Touch, there was UIForce which did this. I still lament the loss of 3D Touch to this day :-(

by jahantechon 7/21/2025, 6:30 PM

This is exactly why normal people call us geeks "weird". Keep bringing on the cool stuff!

by mig39on 7/21/2025, 5:00 PM

Very cool, Krish! Hi from Fort McMurray! I'm going to use this project as an example for a Computer Science class.

by projektfuon 7/21/2025, 7:29 PM

Could it be used to provide gait analysis for your pet mouse?

by qoezon 7/21/2025, 3:42 PM

Apparantely on safari there's touch strength so this should be possible to make for the web too, cool

by markstoson 7/22/2025, 2:31 PM

If you are backpacking with your Macbook, this saves you from also needing to pack a kitchen scale.

by arm32on 7/21/2025, 6:10 PM

I must not use this for weed, I must not use this for weed, I must not use this for weed

by DonHopkinson 7/21/2025, 3:41 PM

Just what I need to roll the quantitative doobie.

by fnord77on 7/21/2025, 6:54 PM

What's the weight range it can handle? no mention of it and I don't want to dig through code

by theyknowitsxmason 7/21/2025, 4:23 PM

Apple would've made an app a long time ago but would get sued after someone put a tire on it.

by mrheosuperon 7/22/2025, 3:47 AM

OT, but this is what i love about apple laptop. They care about small detail, the detail that won't be on spec sheet for advertising.

Like their laptop speaker is superior to any other machine, even premium laptop like xps or surface won't even come close. Or their huge trackpad but still accurate.

I wish other manufacturers copy this from Apple.

by jojohohanonon 7/22/2025, 1:52 AM

I was a bit frustrated that the expected precision wasn’t on the main summary screen.

Does anyone know?

by conflictrackeron 7/22/2025, 7:23 AM

Best repo I discovered this month. I love this kind of stuff.

by qwertytyyuuon 7/21/2025, 3:16 PM

Ah I remember being able to do this with the iPhone 6s

by tlnon 7/21/2025, 3:13 PM

No download link?

by ferbasson 7/23/2025, 1:45 AM

This is a clever idea, well done!

by subdevon 7/21/2025, 7:43 PM

How does one come up with this idea?

by thrownawayszon 7/21/2025, 3:43 PM

Can someone compile a binary? Don't want to download Xcode just for that...

by koiueoon 7/21/2025, 8:51 PM

Finally, some actually useful usage scenario for that oversized trackpad

by byyoung3on 7/21/2025, 9:25 PM

great work

by ynnivon 7/21/2025, 5:46 PM

Finally some hacker news

by ChrisMarshallNYon 7/21/2025, 3:13 PM

Very cool, but I'd still probably just buy a cheap digital scale.