Keystroke command not working in shortcuts app

So I am using shortcuts app on MacOS Monterey. When try to run an AppleScript with Keystroke command in it I get an error message that says

"System Events got an error: Shortcuts is not allowed to send keystrokes."

Even I gave all the permission to Shortcuts app in privacy settings.

Is there any other way to do that in Shortcuts app?

Accepted Reply

I had the same issue, I was able to fix it by allowing both Shortcuts.app and siriactionsd in System Preferences > Security & Privacy > Privacy > Accessibility.

  • Dude that's working👍🏻

  • I've needed to do similar and this answer got me the last, missing piece. From my testing, only the Shortcuts.app is necessary, though this may be due to use case. I did need to also add in ardagent.app when I was using ARD to remotely send commands to simulate what would happen during device enrollment.

  • Where do I find siriactionsd so that I can drag it to Accessibility? (I am not a developer, just a regular user).

Replies

I had the same issue, I was able to fix it by allowing both Shortcuts.app and siriactionsd in System Preferences > Security & Privacy > Privacy > Accessibility.

  • Dude that's working👍🏻

  • I've needed to do similar and this answer got me the last, missing piece. From my testing, only the Shortcuts.app is necessary, though this may be due to use case. I did need to also add in ardagent.app when I was using ARD to remotely send commands to simulate what would happen during device enrollment.

  • Where do I find siriactionsd so that I can drag it to Accessibility? (I am not a developer, just a regular user).

Is this changed in Sonoma? this used to work fine

Can't find siriactionsd in Sonoma; what's weird is that when I have the Shortcuts app open and play a script which sends keys from there, it works when I just have added the Shortcuts app in the Accessibility settings. But when I trigger the script with a hotkey, I get the error, and I then have to remove and add the Shortcuts app in the Accessibility settings again to make it work again playing from the Shortcuts app.