TIP: Resolving Catalina/Mojave Accessibility/Security Permissions Issues

Catalina (and Mojave really) Accessibility and Security Permissions

UPDATED: 2020-02-05

@JMichaelTX noted that there are still people having troubles with Catalina and its accessibility issues.

So lets make this clear - Keyboard Maestro itself has no known problems with Catalina or Mojave.

However, Mojave and Catalina have two accessibility settings bugs which can cause problems trying to enable accessibility permissions for Keyboard Maestro and Keyboard Maestro Engine (which is required for pretty much everything), and Catalina has screen recording settings bugs as well.

Mojave & Catalina Accessibility:

You will have to ensure you enable Accessibility for both Keyboard Maestro and Keyboard Maestro Engine. If you have any troubles with accessibility (eg typing keystrokes, selecting menus, copy/paste, etc), you need to toggle the accessibility permissions (System Preferences, Security & Privacy, Privacy, Accessibility) for Keyboard Maestro and Keyboard Maestro Engine off and then on again.

This especially happens if you already have Keyboard Maestro and upgrade to Mojave or Catalina. This is rather infuriating, as the checkboxes clearly show permission, so anyone would assume that means they have permission, but the system is actually lying, and you have to toggle the checkboxes off and on again to grant permission - who would even think to try that?

Catalina Accessibility:

Catalina continues the tradition started in Mojave of being difficult with the Accessibility permissions, and I have several reports of people having troubles enabling accessibility for Keyboard Maestro Engine. In this case, you simply cannot turn the checkbox on. Clicking it simply does nothing.

You should be able to remove the Keyboard Maestro Engine entry from the accessibility permissions, then quit and relaunch the Keyboard Maestro Engine (in Keyboard Maestro, File ➤ Quit Engine, File ➤ Launch Engine), and then you should be able to enable it.

Accessibility general:

You probably do not need to restart, and if things are still causing problems you can use the Terminal “tccutil reset Accessibility” command to reset the Accessibility permissions, then Restart, and then try the whole process again.

Catalina Screen Recording:

Catalina requires Screen Recording permissions to use things like Found Image and Screen Capture. This preference is in the System Preferences, Security & Privacy, Privacy, Screen Recording preferences - enable Keyboard Maestro.

There is no way to add an application to the permission list, the system does it automatically. Unfortunately, it only does it automatically in some cases, and in other cases (like screen capturing a window) it just silently fails. So you need to use the Screen Capture action to screen capture the desktop to force the system in to asking permission. Once granted, the other facilities related to finding images should then work.

Issues Caused by Antivirus System

Although it may appear that your issues started with an upgrade to Mojave or Catalina, they could be caused by your Antivirus System. For more information, see Can't sync or save new macros macOS 10.15 Catalina - Caused by Antivirus System .

USB Device Key triggers:

USB Device Key triggers work based on low level USB event values. These can, but usually do not, change from system to system and Mac to Mac. They apparently do change in Catalina, so you may have to reset any USB Device Key triggers after upgrading to Catalina.

Simulating Function/Arrow keys does not trigger other application hot keys

Catalina doesn't support triggering hot keys with simulated keys for function keys or arrow keys, but weirdly does allow it for other keys. Whether this is a bug or a “feature” is unknown. If you can change the target hot key to something other than an arrow or function key, then Keyboard Maestro can trigger it based on simulating the key.

Issues with AppleScript Script Libraries

[added 2020-05-14 by @JMichaelTX]

If you are using third party AppleScript Script Libraries, and you encounter an error window similar to this:

image

Then you need to see How To Resolve Catalina Issues with Script Libraries .

Apple Feedback

Note that you should use the Feedback application in Catalina to report any time you encounter any of these bugs. Apple is terrible at fixing bugs, and the only hope they will ever fix any of these bugs is if enough people report them.

4 Likes

Non-English speaking countries may have two accessibility features that must be set for their native language to work.

@guxianbang, thanks for sharing that info.
Could you please provide details, and screen shots would be great!

In the Mojave system, I have encountered this situation many times, and there are two accessibility features, one is Chinese, and the other is English. Only clicking on Chinese is really useful. If clicked in English, it will not work. I am in China.

Just updated OP with above.

3 posts were split to a new topic: Keyboard Maestro missing key strokes in macros in Catalina

I just recently updated to Catalina and ran into the issue with screen recording. I can't get KM to register with it no matter how many screen captures I do. I get everything but the application windows with the screen capture macro right now. I've requested help from Apple, but got nothing but silence. Is there anything else I can do?

I suggest:

  • Restart
  • Launch Keyboard Maestro
  • Create a new macro
  • Add the Screen Capture action, and configure it to capture all screens.
  • Run the macro

Hopefully that will poke the system in to prompting for permission to capture the screen.

Check your System Preferences, Security & Privacy, Privacy, Screen Recording.

I downloaded and installed a fresh copy of Keyboard Maestro on a fresh Copy of Catalina, I also removed all the existing macros to start from scratch and I thought I had this issue. However I had the dark theme enabled all the time and what I just now discovered is that when I added a new macro - it was disabled by default. It was very hard to notice. So once I enabled it everything's working fine :sweat_smile:.

I would imagine it depends on your monitor. Its pretty clear on mine:

image

Also, for future reference, Keyboard Maestro really does try to help explain why a macro is not active:

And finally, the Interactive Help (menu Help, Interactive Help) will make it pretty clear:

1 Like

After upgrading to Catalina (OS 10.15.5), I tried adapting this script:
Make Team Calendars Macro by @peternlewis
Encountered a couple of problems with the AppleScript in that example macro:

  1. It creates a calendar event without an error message but the event is not visible in the Calendar app even after reloading calendars. A separate line of script in Script Editor is able to retrieve the event and read all of its properties, so I know it is there somewhere.
  2. The script throws an error when trying to
    make new display alarm
    so the line had to be disabled. The error message showed NSDetailedErrors. Haven't seen this before in AppleScript.

AppleScript in my Catalina installation seems to be responding differently to Calendar commands.

KM and Engine permissions are working fine, but I don't know whether Calendar has new permission issues.
Could be new command syntax, but I could find no documentation or messages.
Anyone able to offer insight?
Thanks

I just double checked this and it worked without the alarm for me in Catalina without any issues. The script I am just is simply:

set ds to (system attribute "KMVAR_Date") & " " & (system attribute "KMVAR_Time")
set v to system attribute "KMVAR_Vs"
set l to system attribute "KMVAR_Location"

set d to date ds
tell application "Calendar"
	tell calendar "CalName"
		set newEvent to make new event at end with properties {summary:"TemName v " & v, location:l, start date:d, end date:d + 60 * minutes, allday event:false}
		--tell newEvent
		--	set theAlarm to make new display alarm at end with properties {trigger interval:-60}
		--end tell
	end tell
end tell

Ran a test to create an entry using my normal system and it worked fine, it asked me for permission to control Calendar and then the entry appeared immediately.

I'd suggest you double check the properties of the entry, maybe you are getting the date wrong and the entry is somewhere else, or the calendar is not displayed or something like that.

However I agree, the alarm is failing to create, which seems to be a Catalina problem.

This was apparently discussed on the Late Night Software AppleScript forum.

I'll report it as Feedback to Apple, but I doubt it will help.

Thanks @peternlewis for your suggestions. My problem with the "invisible" Calendar event turned out to be a input format issue that the Regex parsed as 00:00 hrs, so the events were tucked away out of sight at midnight.
The Calendar app's default alerts work for me, so I can ignore Apple's alarm bug.

1 Like

Hi, @peternlewis. I'm running into this issue and am not having any lucky remedying it.

I completely reset my screen recording permissions via Terminal and restarted my computer. I was prompted to add back screen recording permissions for my other relevant apps, but not KM.

I then attempted to force the system into asking permission, as you instructed, by using the screen capture action. Unfortunately, doing so didn't have any effect; I still wasn't asked permission to add KM.

So, yeah, as of right now, key KM functionality like found image and screen capture remain unusable to me.

cc/ @Zabobon

Ah, scratch that! I don't know what I did differently, but I finally got asked for screen recording permissions. Hopefully I'm all set now.

1 Like