hammerspoon2-docs
    Preparing search index...

    Function list

    • Returns an array of all available shortcuts.

      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 { acceptsInput: boolean; actionCount: number; id: string; name: string }[]

      The shortcuts

      • acceptsInput: boolean

        Whether the shortcut expects input when run

      • actionCount: number

        How many actions the shortcut contains

      • id: string

        A UUID uniquely identifying the shortcut

      • name: string

        The display name of the shortcut

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