<!--
{
  "availability" : [
    "driverkit: 19.0.0 -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "HIDDriverKit",
  "identifier" : "/documentation/HIDDriverKit/IOHIDEventService/SetLED",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HIDDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOHIDEventService@F@SetLED#i#b#"
  },
  "title" : "SetLED"
}
-->

# SetLED

Configures the on/off state for an LED on the device.

```
virtual void SetLED(uint32_t usage, bool on);
```

## Parameters

`usage`

The usage value that matches the LED you want to set. For a list of possible values, see [LEDs](/documentation/HIDDriverKit/LEDs-enum).

`on`

A Boolean value that indicates whether to turn the light on or off. Specify `true` to turn the light on or `false` to turn it off.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)