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

# SetLED

Sets the state of an LED on the device.

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

## Parameters

`usage`

The LED to set. Specify a value from the LED usage tables in [LEDs](/documentation/HIDDriverKit/LEDs-enum).

`on`

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

---

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)