Skip to content

This enables you easily to access raw data of the multitouch trackpad. [macOS] [MultitouchSupport.framework]

License

Notifications You must be signed in to change notification settings

Reeywhaar/OpenMultitouchSupport

 
 

Repository files navigation

OpenMultitouchSupport

This enables you easily to observe global multitouch events on the trackpad (Built-In only).
I created this framework to make MultitouchSupport.framework (Private Framework) easy to use.
This framework refers to M5MultitouchSupport.framework very much. This project includes a demo.

References

Installation

CocoaPods

pod 'OpenMultitouchSupport'

Carthage

github "Kyome22/OpenMultitouchSupport"

Usage (Swift)

  • Prepare manager
import OpenMultitouchSupport

let manager = OpenMTManager.shared()
  • Register listener
let listener = manager?.addListener(withTarget: self, selector: #selector(process))

@objc func process(_ event: OpenMTEvent) {
	guard let touches = event.touches as NSArray as? [OpenMTTouch] else { return }
	// ・・・
}
  • Remove listener
manager?.remove(listener)
  • Toggle listening
listener.listening = [true / false]
  • The data you can get are as follows:
OpenMTTouch
.posX // Float
.posY // Float
.total // Float, total value of capacitance 
.pressure // Float
.majorAxis // Float
.minorAxis // Float
.angle // Float
.velX // Float
.velY // Float
.density // Float, area density of capacitance
.state // OpenMTState

OpenMTState
.notTouching
.starting
.hovering
.making
.touching
.breaking
.lingering
.leaving

About

This enables you easily to access raw data of the multitouch trackpad. [macOS] [MultitouchSupport.framework]

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 62.6%
  • Swift 18.4%
  • C 13.6%
  • Ruby 5.4%