This enables you easily to observe global multitouch events on the trackpad (only default device).
I created this library to make MultitouchSupport.framework (Private Framework) easy to use.
This library refers the following frameworks very much. Special Thanks!
- Development with Xcode 26.2+
- swift-tools-version: 6.2
- Compatible with macOS 15.0+
App SandBox must be disabled to use OpenMultitouchSupport.
import OpenMultitouchSupport
letmanager=OMSManager.shared()Task{[weak self, manager]inforawaittouchDatain manager.touchDataStream {
// use touchData
}}
manager.startListening()
manager.stopListening()structOMSPosition:Sendable{varx:Floatvary:Float}structOMSAxis:Sendable{varmajor:Floatvarminor:Float}enumOMSState:String,Sendable{case notTouching
case starting
case hovering
case making
case touching
case breaking
case lingering
case leaving
}structOMSTouchData:Sendable{varid:Int32varposition:OMSPositionvartotal:Float // total value of capacitance
varpressure:Floatvaraxis:OMSAxisvarangle:Float // finger angle
vardensity:Float // area density of capacitance
varstate:OMSStatevartimestamp:String}