Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I use the built in tool, Automator (rather than a 3rd party app), to create a simple keyboard macro?

For example, I want it to press Cmd-Shift Left, then Cmd-U, then Right, etc.

I tried using the record feature to create this macro, but ran into several problems.

The first is that it's copying my mouse events after I press record and as I go into the application I want to run the macro on. For example, in this case I want to run it in Chrome. I ended up deleting the first few steps which involved launching chrome. The reason I deleted them is because I don't want it to be limited to a specific application, and I think that it just adds to the complexity if it tries activating an application. I want it to stick with running keyboard commands only.

The second problem is that I'm not sure how to initiate the keyboard macro. Do I save the recorded file? Where to? How do I invoke the macro once I am in Chrome? Is there a way to assign a keyboard shortcut to it?

share|improve this question
I would recommend Keyboard Maestro, it does exactly that. – user14492 Feb 24 at 16:39

If you don't want to use any third party apps you are really complicating your life. Although I think it's possible.

1) Open Automator and create a new Service. In your workflow you want to Run Applescript. In there you tell it to press the keys you want. enter image description here

Once you save it as a Service you can then set up a keyboard shortcut for it in System Preferences. It should automatically show up under the General group. Make sure it's enabled and give it a keyboard shortcut. enter image description here

I have gotten this to work by testing the Show history function Cmd-Y. Hopefully the above isn't too cryptic.

If you want to set global shortcuts and run scripts you might want to look at BetterTouchTool:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.