Skip to content
This enables you easily to access raw data of the multitouch trackpad. [macOS] [MultitouchSupport.framework]
Objective-C Swift C Ruby
Branch: master
Clone or download
Latest commit 43417e4 Oct 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
OpenMultitouchDemo Added pressure Oct 24, 2019
OpenMultitouchSupport.xcodeproj Added pressure Oct 24, 2019
OpenMultitouchSupport Added pressure Oct 24, 2019
.gitignore first commit Jul 11, 2019
LICENSE Initial commit Jul 11, 2019
OpenMultitouchSupport.podspec Added pressure Oct 24, 2019
README.md Added pressure Oct 24, 2019

README.md

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
You can’t perform that action at this time.