I am using a Late 2014 iMac running Big Sur. I would like to be able to make a keyboard shortcut to automatically enter a specific text screen into the current window. I did a Google search on how to do that (I had been thinking it would be an Automator workflow or something like that) and found this guide: https://medium.com/macoclock/using-automator-to-insert-text-with-a-shortcut-key-on-mac-a-step-by-step-guide-b0c30fa2c7c2

I followed the instructions in the guide, but instead of entering the text, it entered a blank line. What am I doing wrong?

  • Pls provide more details. What did you exactly do? How does the quick action look like when you open it with Automator (better include a screenshot)? What is the exact code you put in the "Run AppleScript" pane in Automator? Pls copy and paste the code into your post as text even if it is visible also in the screenshot. In which application and exactly how do you try to utilize the quick action you created?
    – Alper
    Feb 8 at 20:01

1 Answer 1


Turns out I was able to get it to work. Here's the working code:

on run {input, parameters}

tell application "System Events" to keystroke "Test test test"

return input
end run

Not the answer you're looking for? Browse other questions tagged .