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.
How to call CGEventSource.secondsSinceLastEventType
Re: How to call CGEventSource.secondsSinceLastEventType
Ah, so I should look at ObjectiveC source samples instead of Swift...
ImportC ""
CGEventSourceSecondsSinceLastEventType.d(CGEventSourceStateID.l, CGEventType.l)
EndImport
Solved for now.
ImportC ""
CGEventSourceSecondsSinceLastEventType.d(CGEventSourceStateID.l, CGEventType.l)
EndImport
Solved for now.