I'm testing one of my apps in Catalina beta, and running into this dialog

This comes up the first time I run the app in Catalina Beta. I don’t want it to appear at all. I don’t care if the app can get keystrokes when it is not active, I just don’t want the warning to appear.

I’m using AppWrapper to set up entitlements, hardened runtime, code sign, and notarization for the app. Is there another setting I need to play with there?
Is there any way to avoid this dialog?

If you open system preferences and check “Accessibility”, how is your app presented? It may be an entitlement that you DON’T need rather than need to add.

Do you use CGEventTapMBS class?

There we got a new constructor with a PID parameter, so you could limit listening to your app only and avoid this:
Constructor(tapLocation as Integer, Place as Integer, Options as Integer, EventMask as Integer, PID as Integer = -1)

On a fresh install of Catalina Beta 9, in the system preferences it only asks for permission in the “Input Monitoring” section of the Security and Privacy panel. There are no entries in Accessibility.

Nope, not using this class at all.

That’s odd since the dialog that you included above is indicating an Accessibility request.

I have seen this dialog for a couple of apps that definitively don’t need Accessibility. A bug in Catalina?

Is your application a background application?
Do you use system.keyboard anywhere?
Do you have anything to capture “HotKeys” in your application?
Have you sacrificed anything to the Gods of Cupertino recently?

Others have had this come and go with the various betas, my guess is that Apple is tweaking their system for checking this, and sadly it seems like your application contains something that makes it believe it’s keystroke sniffing.

My new app Fast! uses global hotkeys and does not show this message. At least, I never saw this here.
Maybe someone can try and check this? Fast! is available at the macOS AppStore

Please note, the text in the alert is misleading. The text states keystrokes but it seems to apply to any kind of event monitoring outside of your process.

And why doesn’t my app shows this message?

Edit: could be because it is available on the macOS App Store?

What type of event monitoring do you do?

NSEvent addGlobalMonitorForEventsMatchingMask

I just ran a quick test and using addGlobalMonitorForEventsMatchingMask to capture mouse events doesn’t prompt in 10.15.
However, using a passive (listen only) CGEventTap to do the same, does trigger the prompt in 10.15

We have an open case with Apple regarding CGEventTap so i’ll update that as the two APIs should be handling security the same.

There’s 2 differences between the API, and potentially 2 other differences which might affect this.

  1. NSEvent functions are newer.
  2. NSEvent functions are higher level (which Apple recommends).

Two potential reasons.

  1. @Christoph De Vocht s app is Sandboxed, is your application Sandboxed @Kimball Larsen ? *1
  2. @Christoph De Vocht 's app is sold via the Mac App Store, I’ve not confirmed this myself, but I’ve read that other developers have made most of these fear inducing dialogs go away by simply releasing their app on the Mac App Store. *2

*1 The security applied to non Sandboxed applications and to Sandboxed applications is different, Hardened Runtime reduces the attack vectors, while the App Sandbox reduces the ability for a compromised application to attack others.
*2 If this is true, it proves that this security theater is designed to persuade users to purchase via MAS.

Just what is the “monitoring” even about? Does it apply to normal keyboard/mouse event? or only if your app is attempting to do something outside of itself?

@Dave S: you can monitor the creation of files or if files have moved.

I use it for creating global hotkeys.