TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Logging Mac Trackpad Data?

2 点作者 desertraven大约 2 年前
Hi guys,<p>I&#x27;m interested in learning more about trackpads, with a view to add one to an electronics project. Rather than buying a trackpad and hooking it up to an arduino to see if it meets requirements, I figured I&#x27;d use the Mac trackpad I already have.<p>I really just want to see what the shape of the incoming data is, pipe it to a file, and process it later on (at least that&#x27;s what I&#x27;ll be doing in my electronics project).<p>Is it possible to do this with a mac trackpad? Just log the incoming data (time-series coordinates I imagine), throw it in a file.<p>Thanks!

2 条评论

Someone大约 2 年前
For low-level stuff, Apple used to have a developer tool named “USB Prober” for logging USB Traffic (<a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;download&#x2F;all&#x2F;?q=IOUSB" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;download&#x2F;all&#x2F;?q=IOUSB</a>), but that seems to have been abandoned.<p>Google tells me you can use WireShark to capture packets (<a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;forums&#x2F;thread&#x2F;95380" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;forums&#x2F;thread&#x2F;95380</a>) after disabling system integrity protection (<a href="https:&#x2F;&#x2F;developer.apple.com&#x2F;forums&#x2F;thread&#x2F;124875" rel="nofollow">https:&#x2F;&#x2F;developer.apple.com&#x2F;forums&#x2F;thread&#x2F;124875</a>)<p>I wouldn’t know whether that works today. Also, it wouldn’t be “time-series coordinates”, but that information would be in the data captured.
undershirt大约 2 年前
I’m fairly new to macOS development, but I’ve been messing with this a lot lately. Here’s my Swift project[1] for showing macOS trackpad data, which you might be able to adapt to your needs.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;shaunlebron&#x2F;macos-trackpad-demo">https:&#x2F;&#x2F;github.com&#x2F;shaunlebron&#x2F;macos-trackpad-demo</a>