Re: Screensaver can capture mouse events under Catalina

2020-05-26 Thread Gabriel Zachmann via Cocoa-dev
> >> I can confirm: this is indeed critical. Otherwise, the .saver does not >> receive mouse events. >> >> Unfortunately, it seems that I still cannot get key events. > > If you are trying to get events from arrow or modifier keys, you have to use > keyDown and not keyUp. But you may not be

Re: Screensaver can capture mouse events under Catalina

2020-05-26 Thread James Crate via Cocoa-dev
On May 25, 2020, at 3:43 PM, Gabriel Zachmann via Cocoa-dev wrote: > I can confirm: this is indeed critical. Otherwise, the .saver does not > receive mouse events. > > Unfortunately, it seems that I still cannot get key events. If you are trying to get events from arrow or modifier keys,

Re: Screensaver can capture mouse events under Catalina

2020-05-26 Thread Gabriel Zachmann via Cocoa-dev
>> Unfortunately, with -addGlobalMonitorForEventsMatchingMask: , >> the event is still passed on to the higher-up objects, so that makes the >> screensaver engine terminate the screensaver immediately. > > Does this mean you’re unable to set up a global event tap/monitor? If you > are able,

Re: Screensaver can capture mouse events under Catalina

2020-05-26 Thread Sandor Szatmari via Cocoa-dev
Gabriel, > On May 26, 2020, at 04:21, Gabriel Zachmann wrote: > > Thanks a lot for your response! > > Unfortunately, with -addGlobalMonitorForEventsMatchingMask: , > the event is still passed on to the higher-up objects, so that makes the > screensaver engine terminate the screensaver

Re: Screensaver can capture mouse events under Catalina

2020-05-26 Thread Gabriel Zachmann via Cocoa-dev
Thanks a lot for your response! Unfortunately, with -addGlobalMonitorForEventsMatchingMask: , the event is still passed on to the higher-up objects, so that makes the screensaver engine terminate the screensaver immediately. Best regards, Gabriel > On 26. May 2020, at 00:54, Sandor Szatmari

Re: Screensaver can capture mouse events under Catalina

2020-05-25 Thread Sandor Szatmari via Cocoa-dev
Gabriel, (this is a dup reply, forgot to cc list) How are you setting up you global event monitor? I use this to handle catching mouse moved event when my app is not in the foreground…. maybe you use something like this Just watch out for a lot of events and making your app a CPU hog.

Re: Screensaver can capture mouse events under Catalina

2020-05-25 Thread Mark Allan via Cocoa-dev
I have to say, I'd be surprised if this were possible. From a security point of view, I can understand why Apple would want to prevent a screensaver from being able to capture keystrokes. > On 25 May 2020, at 11:34 pm, Michael Diehr via Cocoa-dev > wrote: > >> On May 25, 2020, at 12:43 PM,

Re: Screensaver can capture mouse events under Catalina

2020-05-25 Thread Michael Diehr via Cocoa-dev
> On May 25, 2020, at 12:43 PM, Gabriel Zachmann wrote: > [...] > Unfortunately, it seems that I still cannot get key events. > Best regards, Gabriel I tried what feels like a thousand different variations and could not get key events under Catalina screensaver. If you can figure it out,

Re: Screensaver can capture mouse events under Catalina

2020-05-25 Thread Gabriel Zachmann via Cocoa-dev
>> Also, I'm adding a NSTrackingArea (but not when the screensaver is in >> preview mode). I think this is critical to making it work, but can't say >> for certain. >> >> trackingArea = NSTrackingArea(rect:bounds, >> options:[NSTrackingArea.Options.activeAlways, >>

Re: Screensaver can capture mouse events under Catalina

2020-05-25 Thread Michael Diehr via Cocoa-dev
Great question - I'm the author of iScreensaver. Although our editor app is primarily built using Xojo, the actual .saver file is now a proper Swift .saver file built using Xcode, which internally runs a JavaScript/HTML rendering engine in a WKWebView. I mention this detail in case it's

Re: Screensaver can capture mouse events under Catalina

2020-05-25 Thread Gabriel Zachmann via Cocoa-dev
>> >> https://iscreensaver.com >> > > Looks like a macOS application with screen saver functionality. You could > download it and try it It's a "screensaver builder": you add a bunch of picture, "build" a screensaver, and that sits then in your System Preferences' Desktop & Screensavers

Re: Screensaver can capture mouse events under Catalina

2020-05-25 Thread Richard Charles via Cocoa-dev
> On May 25, 2020, at 6:39 AM, Gabriel Zachmann via Cocoa-dev wrote: > > Here is a screensaver (actually, screensaver builder) that can capture mouse > events: > > https://iscreensaver.com > > Does anyone have an idea how they might be able to do it? > > Best regards, Gabriel Looks like

Screensaver can capture mouse events under Catalina

2020-05-25 Thread Gabriel Zachmann via Cocoa-dev
Here is a screensaver (actually, screensaver builder) that can capture mouse events: https://iscreensaver.com Does anyone have an idea how they might be able to do it? Best regards, Gabriel smime.p7s Description: S/MIME cryptographic signature