Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void) startEventTap {
- NSLog(@"starting");
- //eventTap is an ivar on this class of type CFMachPortRef
- eventTap = CGEventTapCreate(kCGSessionEventTap, kCGHeadInsertEventTap, kCGEventTapOptionListenOnly, kCGEventMaskForAllEvents, myCGEventCallback, NULL);
- CGEventTapEnable(eventTap, true);
- }
- CGEventRef myCGEventCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) {
- NSLog(@"tap");
- return NULL;
- }
Add Comment
Please, Sign In to add comment