hammerspoon2-docs
    Preparing search index...

    Function bindSpec

    • Bind a hotkey with a message description

      Parameters

      • mods: string[]

        An array of modifier key strings

      • key: string

        The key name or character

      • message: string | null

        A description of what this hotkey does (currently unused, for future features)

      • callbackPressed: (() => void) | null

        A JavaScript function to call when the hotkey is pressed, or null for no callback

      • callbackReleased: (() => void) | null

        A JavaScript function to call when the hotkey is released, or null for no callback

      Returns HSHotkey | null

      A hotkey object, or null if binding failed