hammerspoon2-docs
    Preparing search index...

    Function setKeyboardLED

    • Sets a specific keyboard's LED, leaving all other attached keyboards untouched.

      Parameters

      • keyboardID: number

        A keyboard identifier, as returned by attachedKeyboards()

      • 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

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