Keyboard Maestro Triggers and Actions


Keyboard Maestro Triggers and Actions
Mac Tip #450, 18 August 2010

Keyboard Maestro can work your Mac for you, but you need to tell it what to do and when to do it. This Tip explains Triggers, Options within Actions and how to Record a Macro.

Please read Turn 100 steps into 1 with Keyboard Maestro and Point and Click with Keyboard Maestro for a refresher on the basics of Keyboard Maestro.

Use the coupon MacTips for a 20% discount on Keyboard Maestro. [Updated] This offer expires at the end of October 2010. It’s free to test the software.

httpv://www.youtube.com/watch?v=A5dm_jHhHS0

Please subscribe to the MacTips channel. Or just visit this video on YouTube, leave comments and rate it, as that helps spread the word about the MacTips.

Triggers

Previous Tips showed how to set up some macros for Keyboard Maestro to work with, but a big consideration is how to trigger a macro. There are triggers like typing something, clicking a button, choosing a menu item, or even setting things to happen at a certain time.

Here are some details about a few specific triggers. There are full details about all the Triggers on the Keyboard Maestro website.

Hot Key and Typed String
Keyboard Maestro Hot Key trigger: Home is pressed.

Keyboard Maestro Hot Key trigger: Home is pressed.

A Hot Key may be something like pressing Return or F8. You choose which key it will be and whether the trigger is simply held down or pressed or released.

How to choose the Hot Key and its options:

  1. Click the green + beside a trigger and choose Hot Key Trigger from the menu that appears. Hot Key options appear below the words This hot key:.
  2. Click the arrow (▾) beside the field highlighted in blue and labelled Type. Many keys, such as Return, Enter and Clear are listed. Choose the key you want to use. Its name replaces the word Type.
  3. Click on the is pressed option to the right of the key selection box. A menu appears with choices: is pressed, is down, and is released. Choose the state that suits your project.

Now when you press, release or hold down the selected key the macro will leap into action.

A Typed String is where you may type something like teh. A possible Action is to automatically replace what’s typed by a correction. I explained that in the first Tip. Of course, you can choose any actions you like — perhaps opening a program, runing a script or something else.

Keyboard Maestro Time trigger.

Keyboard Maestro Time trigger.

Time Trigger

A Time Trigger activates at a selected time on selected days. My screenshot shows a Time Trigger that will activate at 08:30 on Mondays, Wednesdays and Fridays.

Select either the hour or minutes, then use the arrows beside the time field to increase or decrease the hours or minutes by 1. Or just type a new time.

When you create a new Time Trigger, all the days are selected. Click on any day to toggle the selection.

Keyboard Maestro Status Menu and Macro Palette.

Keyboard Maestro Status Menu and Macro Palette.

Status Menu Trigger

The Status Menu appears in the Menu Bar. If you choose this as a Trigger the name of the macro will appear under the Keyboard Maestro Menu Bar icon.

The Status menu always appears, if you choose that Option in Preferences, whether there are any available macros or not.

The screenshot shows my Status Menu open, with about a dozen macros available.

Macro Palette Trigger

The Macro Palette Trigger is a bit tricky.

It appears in my screenshot as a dark grey button ‘floating’ on screen, and displaying the Keyboard Maestro icon. If I hover over it, it opens up to list available macros.

Keyboard Maestro Macro Palette - open.

Keyboard Maestro Macro Palette — open.

The thing is, that if you don’t have any active macros that use it, then it doesn’t appear at all. Nor does it appear if you close it by clicking the grey x in the top left corner.

To be able to use the Macro Palette choose it as a Trigger for an Action. Then when you hover over the Macro Palette it expands so you can click an item. It collapses again when you move the mouse away.

To relocate the Macro Palette on screen hover over it to expand it, then drag by the Title Bar.

Options within Actions

Most Actions provide options for how they will work. For example, the Manipulate a Window action could resize a specific window by a percentage or a number of pixels, move the window to a specific location, close it or do various other things.

Keyboard Maestro Action details.

Keyboard Maestro Action details.

These options are slightly hidden. On any Action, look for the disclosure arrow (▹) beside the Action and click it to reveal more options. Also look for a double-headed arrow beside any text as it shows you can click an item to bring up a menu of options.

Record a Macro

Keyboard Maestro record a macro.

Keyboard Maestro record a macro.

You may wish to click somewhere on screen or resize a window to certain dimensions as part of an Action.

There’s no need to guess at the co-ordinates for such activities: instead Record a Macro. Keyboard Maestro will record everything you do, including extra clicks and actions.

After recording you can delete the extra stuff, or just pick out the smaller actions you wanted to do and use them in another Macro.

To Record a Macro make a new Action, then click the Record button at the bottom of the window. A red ‘alert’ appears under the Actions list in the Macro and a red ‘Recording’ button appears on screen.

Now click on windows, move things, open applications and so on. Keyboard Maestro records everything you do.

When you’re finished recording click on the red Recording button to stop recording.

Now sift through the recorded Actions to locate those you need. This is a great way to discover the co-ordinates for clicking the mouse as part of a larger action.

Triggers and Actions lie at the core of Keyboard Maestro. Just remember to look a little below the surface to access its full power.

Use the coupon MacTips for a 20% discount on Keyboard Maestro. [Updated] This offer expires at the end of October 2010.

Have you used Keyboard Maestro yet? Tell us about your experiences in the Comments. Have you found any great Tips? Share them with us.

Related posts

[wpzon keywords="pressure cooker" sindex="PCHardware" snode="1232597011" sort="salesrank" listing="8"]

2 Comments

  1. Zettt said:

    Hi Miraz,

    Peter tweeted a link to one of your screencast. I’m just here to give you some tips how you could improve them.
    I’ve seen you’re using a bigger mouse cursor. That’s good, but it’s still pretty hard to tell what exactly you’re doing. In ScreenFlow you can create so called Movie Actions (I don’t know their real name, though. The shortcut is ⌘K however). Those Actions have an in- and out-point where they save zoom-level and pan.
    I made some Keyboard Maestro screencasts by myself. If you want to check them out go here:
    http://bit.ly/d1RcH6
    http://bit.ly/aN58PY

    By the way I love Keyboard Maestro! Such a great tool!

  2. Miraz Jordan said:

    Peter emailed: “With the Hot Key trigger, you can click on the field and press any key you like. Also, you can hold down and modifiers you like and select from the popup menu.

    A lot of people seem to think the menu restricts what key you can use as a hot key, but it is actually only there as a convenience (more so as a Type a Keystroke convenience for typing keys you don’t actually have on your keyboard).”

Comments are closed.

Top