hammerspoon2-docs
    Preparing search index...

    Function list

    • Returns an array of all available shortcuts.

      Each entry is a plain object with the following keys:

      Key Type Description
      name string The display name of the shortcut
      id string A UUID uniquely identifying the shortcut
      acceptsInput boolean Whether the shortcut expects input when run
      actionCount number How many actions the shortcut contains

      The shortcuts are read from Shortcuts Events, so Hammerspoon needs the Automation permission for it; macOS asks the first time. An empty array means there are no shortcuts: when they can't be read (the permission is denied, or nobody answers its prompt within 2 minutes), list() throws instead.

      Returns Record<string, any>[]

      An array of shortcut descriptor objects.

      Throws an Error on failure; wrap calls in try/catch to handle it.