Questions

How to make a macro on a Mac

Download on the Mac App StoreInputConfig is completely free on the Mac App Store. You don't have to make an account, there are no subscriptions, and nothing is locked. Optimized for Apple silicon.

A macro is a list of actions that runs from one press, and on a Mac you can make one for free. macOS already has pieces of this, and for some jobs they are the right answer, so they come first. When you want a timed chain of keystrokes, shortcuts and clicks on a controller button, a mouse side button, a MIDI pad, or a key, InputConfig builds it, free and open source.

On this page
  1. Use what macOS already does
  2. Build a macro in InputConfig
  3. Put shortcuts inside a macro
  4. Choose when it runs, and how often
  5. Use timing that works
  6. What it does not do
  7. The short version
  8. Questions

Use what macOS already does

  • Typing a phrase. Text Replacements, in the Keyboard section of System Settings, expand a short abbreviation into any text you like, in most apps.
  • A new shortcut for a menu command. Keyboard Shortcuts, App Shortcuts, in the same place, gives any menu item the key combination you want.
  • Multi-step automations. The Shortcuts app chains actions such as opening apps, resizing windows, and working with files, and a shortcut can have its own key combination.

If a Shortcut already does the job, an InputConfig row can run it from any button with Run Siri Shortcut. See running a Shortcut from a controller.

Build a macro in InputConfig

  1. Install InputConfig from the Mac App Store and allow Accessibility access.
  2. Click Add a new bind, press Scan, and press the control that will run the macro.
  3. Open the row's Options and tick Run a sequence of steps (macro). The same item is under Extra actions in the output menu.
  4. Click Add a step. Each step is a Keyboard Key or a Mouse Button, with a Wait before it fires and how long it is held, in milliseconds.
  5. Save, close the editor and activate the preset.
A macro row in the InputConfig editor with three steps: Command C, Command Tab with a 400 ms wait, and Command V.
Figure 1. Copy, switch app, paste: three Tap steps, with a longer wait before the step after the app switch.
  • You: Put the cursor somewhere safe, such as an empty note, and press the control.
  • InputConfig: Runs every step in order, with the waits you set.
  • Check: Each step lands. If one is dropped, lengthen the wait before it.

The built-in Macros & Turbo preset has two to copy: its A button copies, switches app with Command Tab, and pastes, and its Y button moves down three items and presses Return.

A row's Options with Run a sequence of steps ticked.
Figure 2. Open the row's Options and tick Run a sequence of steps. The row's single output becomes a list.
A macro's steps: Command C, a 300 ms wait, then Command V.
Figure 3. Copy, wait 300 ms, paste, built from Hold down, Tap and Release steps. The wait gives the app time to finish copying.
A macro step's menu open, offering Keyboard Key and Mouse Button.
Figure 4. Add another step and choose Keyboard Key or Mouse Button for it.

Put shortcuts inside a macro

A key step has ⌃ ⌥ ⇧ ⌘ toggles beside it, so Command C is one Tap step: C with ⌘ on. Each step also has a kind:

  • Tap. Presses and releases.
  • Hold down. Keeps a key held while the next steps run, which is how you hold Shift across several clicks or keep Command down through a Tab, Tab, Tab.
  • Release. Lets a held key go.

Anything a macro leaves held when it ends is released for you, so a key cannot get stuck. Steps can be moved up and down and duplicated with the buttons at the end of each one.

Choose when it runs, and how often

  • When it runs. At the top of the macro, choose Every step, each time it is pressed or Only while held. Letting go stops it, which stops the rest of the steps and releases anything held the moment you let go.
  • Repeat. To play the whole macro more than once per press, set Repeat under How it fires. Since 1.6 a repeating macro waits the time you set between passes.
  • One copy at a time. Pressing again while a macro is still running does not start a second copy over it.

A macro row fires while held or toggles on and off. It does not combine with turbo, a hold action or a double tap.

Use timing that works

  • Keystrokes. Most apps read a keystroke held for 30 to 50 ms with a 50 ms gap.
  • Switching apps. Needs 300 to 500 ms before the next step.

If a macro drops a key, lengthen the wait before the step that misses.

What it does not do

  • Record you. InputConfig does not record a macro by watching you. You build it step by step, which also means every step and every wait is visible and easy to change.
  • Type sentences in steps. Steps are keys, shortcuts and clicks at the pointer. To type a sentence, put a Type Text output on its own row, or use a Text Replacement.
  • Take a key away. The app listens to the keyboard alongside macOS, so a key you use as the trigger still types. The best triggers are controls that type nothing: a controller button, a MIDI pad, a mouse side button, or F13 to F19. The macro deck guide builds a whole deck of them.

The short version

  • Text or a menu command. Use Text Replacements or App Shortcuts, which are built into macOS.
  • A chain of keys and clicks. A macro row in InputConfig, with a wait and a hold time per step.
  • A trigger. A control that types nothing.

Build it one step at a time and test each step as you go.

Questions

Is there free macro software for Mac?

Yes. InputConfig is free and open source on the Mac App Store, and macros, turbo, and every other feature are included, with no paid tier.

Can a mouse button run a macro on a Mac?

Yes. A mouse's side buttons can be the input of a macro row, with no vendor software.

Can a macro click the mouse?

Yes. A step can be a left, right or middle click, or a back or forward button, at wherever the pointer is.

Can a macro step press a keyboard shortcut?

Yes. Since 1.6 a key step has Control, Option, Shift and Command toggles, so Command V is a single step.

Can a game controller run macros on a Mac?

Yes. Any button on a supported PlayStation, Xbox, Switch, 8BitDo, or other controller can run one. The macro sends keys and clicks, so it works in apps and in games played with keyboard and mouse.

This page in other languages: Deutsch, 한국어, Русский, ไทย, 繁體中文

Download on the Mac App StoreOpen source on GitHub.

Updated