Re: unexpected error
Ken Thomases <[email protected]> Wed, 8 Oct 2014 08:56:29 -0500
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <[email protected]> |
On Oct 8, 2014, at 5:48 AM, Eric Le Lay <[email protected]> wrote: > tap = Quartz.CGEventTapCreate( > Quartz.kCGSessionEventTap, > Quartz.kCGHeadInsertEventTap, > Quartz.kCGEventTapOptionDefault, > # NSSystemDefined for media keys > Quartz.CGEventMaskBit(NSSystemDefined), > self.eventTap, > None > ) > port = NSMachPort.alloc().initWithMachPort_options_(CFMachPortGetPort(tap), NSMachPortDeallocateNone) > loop = NSRunLoop.currentRunLoop() > loop.addPort_forMode_(port, NSDefaultRunLoopMode) Why are you not doing what the docs for CGEventTapCreate() suggest: pass the CFMachPortRef returned from it to CFMachPortCreateRunLoopSource() and then add the resulting source to the run loop using CFRunLoopAddSource()? Regards, Ken ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk