Alfred - Conductor for Keyboard Maestro

Welcome to this documentation page for Conductor - a Keyboard Maestro workflow for Alfred, the popular launcher and automation application for macOS.

What is Conductor?

Keyboard Maestro is a third party utility that allows you to build and run macro-based automations to interact with other applications and the operating system. It provides an Automator-like user interface with a large array of triggers and actions, and with support for triggering scripts and targeting actions on user interface elements (e.g. buttons and menus).

Conductor is a workflow for interacting with Keyboard Maestro (introduced in March 2021) and specifically for working with macros. It primarily utilises different trigger keywords that allow you to carry out a variety of actions relating to Keyboard Maestro.

Download Conductor

Latest Version: 1.5.1

Prerequisites:

Terminology

There are a few terms is will be useful to understand before reading the rest of this documentation as it will help you understand at a glance some of the different ways Keyboard Maestro is queried.

Disabled (Groups/Macros)

In Keyboard Maestro it is possible to enable and disable individual macros, or entire groups of macros. Some users disable groups or macros they do not currently need, might need later, or might make a useful reference, but are no longer required.

Typically, we do not want to work with disabled groups and macros, but there may be some occasions where that is exactly what we want to do.

Enabled (Groups/Macros)

This is the opposite of Disabled above. Enabled groups and macros can generally be considered as available to work with.

Smart Groups

These are groups that contain no macros, but in Keyboard Maestro (not Conductor) can be used to build dynamic filtered sets of macros located in other groups.

Macro Groups

This term can effectively be considered to be groups that are not Smart Groups. These groups are capable of containing macros.

Active Groups

This is a subset of Macro Groups and of Enabled Groups. Macro Groups can have restrictions defined such that they are only available in specific circumstances. For example, a group of macros can be set as to only be available in specific apps.

Currently, Active Groups caters for groups that are restricted to be available in specified apps. In the future, this will hopefully, be expanded to include many of the many other options that Keyboard Maestro offers (excluding apps, temporal and event-based activation, window title checks). The current release is the first stage in restricting the list.

Functionality

Conductor offers several features, and these have been broken down into two broad types.

Macros and Group Operations

Active Macro Operations

Keyword Trigger: km
This is by far the most actively used feature for most users of Conductor, and may be the only feature you get use from. When you enter the keyword, the workflow will populate Alfred with a list of enabled macros from active groups. km followed by a space, will allow you to then enter text to filter the list of macros, finally allowing you to select one. Once selected, Conductor will instruct Keyboard Maestro to run the specified macro.

In addition, holding down modifier keys will give you access to additional functionality.

  • Holding down the Alt/Option key will open the selected macro in Keyboard Maestro ready for editing.
  • Holding down the Ctrl key will copy the run macro URL (based on the UUID) for the selected macro to the clipboard.
  • Holding down the Cmd key will copy the name of the selected macro to the clipboard.
  • Holding down the Shift key run the selected macro after a preset delay. See ;km below for setting the length of the delay.
  • Holding down the Shift and Fn keys will instruct Keyboard Maestro to set the selected macro as disabled.
  • Holding down the Shift and Cmd keys will copy the unique ID (UUID) of the selected macro to the clipboard.
  • Holding down the Shift and Ctrl keys will copy a Markdown link (with the URL based on the UUID) for the selected macro to the clipboard.

Enabled Macro Operations

Keyword Trigger: km*
This feature is similar to the previous one, but rather than enabled macros from active groups, it lists enabled macros from enabled groups (i.e. it includes macros not restricted from use in the currently focused app).

As for Active Macro Operations, holding down modifier keys will give you access to additional functionality.

  • Holding down the Alt/Option key will open the selected macro in Keyboard Maestro ready for editing.
  • Holding down the Ctrl key will copy the run macro URL (based on the UUID) for the selected macro to the clipboard.
  • Holding down the Cmd key will copy the name of the selected macro to the clipboard.
  • Holding down the Shift key run the selected macro after a preset delay. See ;km below for setting the length of the delay.
  • Holding down the Shift and Fn keys will instruct Keyboard Maestro to set the selected macro as disabled.
  • Holding down the Shift and Cmd keys will copy the unique ID (UUID) of the selected macro to the clipboard.
  • Holding down the Shift and Ctrl keys will copy a Markdown link (with the URL based on the UUID) for the selected macro to the clipboard.

Delayed Run of Active Macro

Keyword Trigger: #km
When you enter the keyword, the workflow will populate Alfred with a list of enabled macros from active groups. Typing the keyword trigger followed by a space, will allow you to then enter text to filter the list of macros, finally allowing you to select one. Once selected, Conductor will apply a preset delay (see ;km below), and then instruct Keyboard Maestro to run the specified macro.

Delayed Run of Enabled Macro

Keyword Trigger: #km*
When you enter the keyword, the workflow will populate Alfred with a list of enabled macros from enabled groups. Typing the keyword trigger followed by a space, will allow you to then enter text to filter the list of macros, finally allowing you to select one. Once selected, Conductor will apply a preset delay (see ;km below), and then instruct Keyboard Maestro to run the specified macro.

Disable Macro Group

Keyword Trigger: kmgd
When you enter the keyword, the workflow will populate Alfred with a list of enabled macro groups. Typing the keyword trigger followed by a space, will allow you to then enter text to filter the list of macro groups, finally allowing you to select one. Once selected, Conductor will instruct Keyboard Maestro to set the specified macro group as disabled.

Disable Macro

Keyword Trigger: kmmd
When you enter the keyword, the workflow will populate Alfred with a list of enabled macros from enabled macro groups. Typing the keyword trigger followed by a space, will allow you to then enter text to filter the list of macros, finally allowing you to select one. Once selected, Conductor will instruct Keyboard Maestro to set the specified macro as disabled.

Enable Macro Group

Keyword Trigger: kmge
When you enter the keyword, the workflow will populate Alfred with a list of disabled macro groups. Typing the keyword trigger followed by a space, will allow you to then enter text to filter the list of macro groups, finally allowing you to select one. Once selected, Conductor will instruct Keyboard Maestro to set the specified macro group as enabled.

Enable Macro

Keyword Trigger: kmme
When you enter the keyword, the workflow will populate Alfred with a list of disabled macros from enabled macro groups. Typing the keyword trigger followed by a space, will allow you to then enter text to filter the list of macros, finally allowing you to select one. Once selected, Conductor will instruct Keyboard Maestro to set the specified macro as enabled.

List Keyboard Maestro Information

Keyword Trigger: kmlist
When this keyword is entered, a list of options is presented. Selecting an option will generate a list in Markdown format of the specified data and place the result on the system clipboard.

  • Enabled Macros Groups and Macros
    • Groups appear at the root level.
    • Groups are marked up as bold.
    • Macros within a group are indented underneath the group by a tab character.
  • All Macros Groups and Macros
    • Groups appear at the root level.
    • Groups are marked up as bold.
    • Macros within a group are indented underneath the group by a tab character.
  • Enabled Macros Groups
    • Groups appear at the root level.
  • All Macros Groups
    • Groups appear at the root level.
  • Enabled Groups
    • Groups appear at the root level.
  • Smart Groups
    • Groups appear at the root level.

Workflow Operations

Set Delay

Keyword Trigger: kmdelay
Keyword Trigger: ;km
When you enter the keyword followed by an integer value, this will set a workflow level variable in Conductor. This variable specifies the number of seconds to wait when triggering a macro on the functions that explicitly introduce a preset delay.

When the keyword is entered, the subtitle in Alfred displays what the current delay is set as (in seconds).

The ;km keyword is deprecated with the release of Conductor v1.2.0. Please note that this will be removed in a future release.

Diagnostics

Keyword Trigger: kmdiag
Conductor requires a number of prerequisites to be in place to function correctly. In particular, Python 3. This flow can help diagnose issues with your set-up.

Help

Keyword Trigger: kmhelp
Conductor does not come with any inbuilt help (other than the diagnostic tool), but this flow provides a list of links to other content. Each of these is also accessible via a direct keyword, and so the details can be found under each of those.

Keyboard Maestro Documentation

Keyword Trigger: kmdocs
Entering this keyword will open the Keyboard Maestro Wiki.

Search the Keyboard Maestro Wiki

Keyword Trigger: kmwiki
Typing in this keyword followed by a space and a set of one or more search terms will open the Keyboard Maestro Wiki’s search results page for the specified search terms.

You may also find the wiki’s “Searching the Wiki” page useful if you make use of this function.

Open Conductor Documentation

Keyword Trigger: kmcondocs
Entering this keyword will bring you to this page, documenting the Conductor workflow.

Get Extras

Keyword Trigger: kmextras
Entering this keyword trigger will display a list of additional things you may be interested in relating to Alfred and Keyboard Maestro. This includes a Keyboard Maestro plugin I created, some other Alfred workflows I put together and a variety of blog posts relating to these apps. You can even get a link to my Buy Me a Coffee page.

Triggers

The most common way of accessing Conductor’s functionality is via keywords, but there are other methods too.

Keyword

Keyword triggers are text entered directly into the Alfred window to trigger a flow.

Keyword Functionality
km Active Macro Operations
km* Enabled Macro Operations
#km Delayed Run of Active Macro
#km* Delayed Run of Enabled Macro
kmgd Disable Macro Group
kmmd Disable Macro
kmge Enable Macro Group
kmme Enable Macro
kmlist List Keyboard Maestro Information
;km Set Delay
kmdelay Set Delay
kmdiag Diagnostics
kmhelp Help
kmdocs Keyboard Maestro Documentation
kmwiki Search the Keyboard Maestro Wiki
kmcondocs Open Conductor Documentation
kmextras Get Extras

External

External triggers can be used within any Alfred workflow to call a flow in Conductor, or even externally through a AppleScript call.

External Functionality
Choose Macro Allows km keyword functionality to be called using an external workflow call.
Copy Macro ID Copy the macro name specified by the contents of {query}.
Copy Markdown Link Copy a UUID-based launch URL as a Markdown link from a UUID specified by the contents of {query}.
Copy Macro Name Copy the macro UUID specified by the contents of the macro UUID in {query}.
Copy Macro URL Copy the UUID-based launch URL from a UUID specified by the contents of {query}.
Delayed Run Macro Run a macro by UUID, with the UUID specified by the contents of {query}, after a preset delay.
Disable Disable the macro/group associated with the UUID specified by the contents of {query}.
Edit Macro Edit a macro by UUID, with the UUID specified by the contents of {query}.
Enable Enable the macro/group associated with the UUID specified by the contents of {query}.
Failure Sound Play a sound to denote an unsuccessful operation.
Run Macro Run a macro by UUID, with the UUID specified by the contents of {query}.
Success Sound Play a sound to denote a successful operation.

Enabled Macro Operations is available as a fallback search in Alfred.

Change Log

  • Version 1.5.1: 2023-05-29
    • Fix: Corrected some disagnostics information to cater for Alfred v4 to v5 changes.
  • Version 1.5.0: 2022-11-20
    • Change: delay changed from an environment variable to user configuration.
    • Fix: Corrected some documentation layout issues.
  • Version 1.4.0: 2022-07-24
    • Add: Copy macro ID option for macros.
    • Add: Copy Markdown link option for macros.
    • Fix: Corrections to documentation of modifier keys (this documentation page).
  • Version 1.3.0: 2022-05-28
    • Add: Added Choose Macro external trigger.
    • Add: Added additional all-user Python envionment information to diagnostics output.
  • Version 1.2.1: 2022-05-18
    • Fix: Missing diagnostic script file - thanks to @danielthorpe7 for identifying.
  • Version 1.2.0: 2022-04-22
    • Add: Default km behaviour now includes more restricted filtering.
    • Add: Added some new modifier to km to disable macros.
    • Add: Switched to a new Python script launching technique as used in Doctor Drafts.
    • Add: Added a new diagnostic option based on the one available in Doctor Drafts.
    • Add: Markdown lists of information about groups and macros can now be generated.
    • Add: Switched to a, more colourful icon based on the conductor icon created by Freepik, from Flaticon.
    • Add: General internal restructuring to improve ease of maintenance as the workflow grows.
    • Add: Moved, and expanded, documentation to a new set of online documentation (this page).
    • Add: Added a variety of online help-related options.
    • Change: Switched existing km functionality to be linked to km*.
    • Change: Switched existing #km functionality to be linked to #km*.
    • Change: Deprecating ;km in favour of kmdelay.
  • Version 1.1.1: 2021-09-11
    • Fix: Typo correction.
  • Version 1.1.0: 2021-08-07
    • Fix: Added fallback search option.
  • Version 1.0.0: 2021-03-23
    • Add: Initial release, everything is new.

Conductor is just one of several Alfred workflows I have created. You can find more workflows and blog posts related to Alfred on my Alfred page