How to call CGEventSource.secondsSinceLastEventType
Posted: Wed Aug 28, 2019 5:07 am
Any mac guru knows how to translate this piece to PB?
; var lastEvent:CFTimeInterval = 0
; lastEvent = CGEventSource.secondsSinceLastEventType(CGEventSourceStateID.hidSystemState, eventType: CGEventType(rawValue: ~0)!)
AFAIK:
hidSystemState is a constant with value 1. That ~0 matches kCGAnyInputEventType.
secondsSinceLastEventType is a class method. Can't find an example of calling one.
Any help appreciated.
; var lastEvent:CFTimeInterval = 0
; lastEvent = CGEventSource.secondsSinceLastEventType(CGEventSourceStateID.hidSystemState, eventType: CGEventType(rawValue: ~0)!)
AFAIK:
hidSystemState is a constant with value 1. That ~0 matches kCGAnyInputEventType.
secondsSinceLastEventType is a class method. Can't find an example of calling one.
Any help appreciated.