Browse the docs

Your first macro

Make ;addr type your full address in any app, try it, turn it off and on, and change it. No code and no settings to learn.

Keyboard Maestro: New Macro

You will make Switchboard type your full address whenever you type ;addr, in any app. It takes about two minutes. This kind of macro is called a snippet: a short abbreviation that turns into a longer text.

Before you start, give Switchboard Engine the two permissions from Getting started. Without Input Monitoring it can't hear what you type.

Make it #

  1. Choose File › New Snippet, or press ⌃⌘N. The snippet editor opens on the abbreviation, which already starts with ;.

  2. Make the abbreviation read ;addr and press Return. The semicolon matters: nobody types ;addr by accident, so the snippet only fires when you mean it.

  3. In Text it types, write your address the way you want it typed, line breaks included:

    Sam Taylor
    12 Orchard Lane
    Springfield 01103

That's all. The snippet turns itself on as soon as it has an abbreviation and some text, and Switchboard saves as you type. The preview under the text shows exactly what will be typed.

Run it #

Press Try It at the bottom of the snippet editor. The text appears in the box below it, as it would be typed, and nothing else on your Mac is touched.

Now try it for real. Open TextEdit, Notes or a new email, and type ;addr. Switchboard deletes ;addr and types your address in its place.

Turn it off and on #

Beside the abbreviation is a switch. Click it and the snippet is off: a small Off label appears, and typing ;addr does nothing. Click it again to turn it back on. Turning a macro off never deletes it, so this is the way to rest one you're not sure about.

Change it #

Click in the text and edit it; the change is saved as you go. To change the abbreviation, click ;addr and type a new one. If you change your mind, Edit › Undo (⌘Z) takes the edit back.

The buttons above the text add things that change each time: Date… for today's date, Clipboard for whatever you copied, Cursor for where the cursor should end up. Snippets explains each one.

What you just made #

Press Show as Blocks beside the switch. The snippet is an ordinary macro, shown as rows:

  • When holds the trigger: ;addr is typed.

  • Only if is empty, so it always goes ahead. A condition here could limit it to certain apps.

  • Do holds one step: Type the address into the front app.

Every macro in Switchboard has these three rows. A different trigger (a key you press, an app opening, a time of day) and different steps (open an app, move a window, show a message) give you a different macro.

Here is the same macro as a block you can try from this page:

;addr types your address
When
  1. Type “;addr”
Do
  1. Type “Sam Taylor⏎12 Orchard Lane⏎Springfield 01103”
Open in Switchboard to try it

Next #

When you want a macro that works something out instead of typing a fixed text, go on to A macro that works something out.