Keyboard Maestro Complex multi-step macros and app automation

Keyboard Maestro handles automation that requires logic โ€” conditionals, variables, loops, clipboard manipulation, and multi-step sequences too complex for BTT or Raycast.

Engine: Always running as a background process. Macros fire via hotkeys, typed strings, application triggers, or calls from BTT/Hammerspoon.

Trigger Types
Trigger Use case
Hot Key Direct keyboard shortcut
Typed String Abbreviation expansion (e.g., ;;addr โ†’ full address)
Application Run when an app launches, activates, or quits
Time Schedule โ€” on login, at time, periodically
BTT Named Trigger Called from btt:// URL scheme
Hammerspoon Called via hs.osascript or URL event
Palettes

Palettes are visual popup menus of macros triggered by a hotkey. Use them to group related macros without memorizing individual shortcuts.

Create: New Group โ†’ set “Show as palette when…” โ†’ assign a trigger hotkey.

Variables & Clipboard

KM variables persist across macro runs. Use Set Variable action and reference with %Variable%VariableName%.

The Named Clipboard system stores multiple clipboard items โ€” useful for multi-step copy-paste workflows across windows.

Config Location

Macros are stored in ~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Macros.plist. Sync via iCloud Drive or back up manually before major changes.

Export groups: right-click group โ†’ Export โ†’ saves as .kmmacros file.