---
title: SetLED
framework: hiddriverkit
role: symbol
role_heading: Instance Method
path: hiddriverkit/iouserhideventdriver/setled
---

# SetLED

Sets the state of an LED on the device.

## Declaration

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

## Parameters

- `usage`: The LED to set. Specify a value from the LED usage tables in doc://com.apple.hiddriverkit/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.
