hammerspoon2-docs
    Preparing search index...

    Function setLED

    • Sets a keyboard LED on every attached keyboard that has one.

      Parameters

      • name: string

        The LED to set — one of "caps", "scroll", or "num"

      • state: boolean

        true to turn the LED on, false to turn it off

      Returns boolean

      true if the LED was successfully set on at least one keyboard

      Requires Input Monitoring permission — see hs.permissions.requestInputMonitoring().