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?

Answered by Cwest4 in 698792022

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.

Accepted Answer

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.

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.

After trying multiple combinations, what worked for me (in Sonoma 14.5) was granting permission in Privacy & Security > Accessibility to all of the following:

  1. assistant_service in /System/Library/PrivateFrameworks/AssistantServices.framework/Versions/A/Support/assistant_service
  2. Shortcuts
  3. Siri
  4. siriactionsd in /System/Library/PrivateFrameworks/VoiceShortcuts.framework/Versions/A/Support/siriactionsd
Keystroke command not working in shortcuts app
 
 
Q