Skip to content

Keyboard Maestro

Keyboard Maestro is a macOS automation app for creating and running macros. Protocol Launcher generates Keyboard Maestro URLs documented by the official URL Schemes page: editor URLs with the keyboardmaestro scheme and macro trigger URLs with the kmtrigger scheme.

Usage

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Enter Username And Serial Number

Generate the documented editor URL for entering a Keyboard Maestro username and serial number.

On-Demand
ts
import { enterUserAndSerial } from 'protocol-launcher/keyboard-maestro'

const url = enterUserAndSerial({
  user: 'support@stairways.com',
  serial: 'ABCDEFGH0123456789',
})

Edit Macro Or Macro Group

Generate the documented editor URL for editing a macro or macro group by name or UUID.

On-Demand
ts
import { editMacroOrGroup } from 'protocol-launcher/keyboard-maestro'

const url = editMacroOrGroup({
  macroOrGroup: 'Activate Application Switcher',
})

const uuidUrl = editMacroOrGroup({
  macroOrGroup: 'D2F427A1-51E3-4719-820B-4C25B6FF7329',
})

Filter Macros

Generate the documented editor URL for filtering macros, optionally selecting a macro group first.

On-Demand
ts
import { filterMacros } from 'protocol-launcher/keyboard-maestro'

const url = filterMacros({
  keyword: 'Activate',
})

const groupUrl = filterMacros({
  group: 'All Macros',
  keyword: 'Activate',
})

Filter Actions

Generate the documented editor URL for filtering actions, optionally selecting an action category first.

On-Demand
ts
import { filterActions } from 'protocol-launcher/keyboard-maestro'

const url = filterActions({
  keyword: 'Execute',
})

const categoryUrl = filterActions({
  category: 'All Actions',
  keyword: 'Execute',
})

Trigger Macro

Generate the documented kmtrigger URL for triggering an active and enabled macro by name or UUID, optionally with a trigger value.

On-Demand
ts
import { triggerMacro } from 'protocol-launcher/keyboard-maestro'

const url = triggerMacro({
  macro: 'Your Macro Name',
})

const uuidUrl = triggerMacro({
  macro: '224AA8CB-07EB-4C92-8201-68FED82B6E9F',
})

const valueUrl = triggerMacro({
  macro: 'Your Macro Name',
  value: 'Your Trigger Value',
})

const uuidValueUrl = triggerMacro({
  macro: '224AA8CB-07EB-4C92-8201-68FED82B6E9F',
  value: 'Your Trigger Value',
})

Official Documentation