---
name: "XkbGetDeviceLedInfo"
section: "3"
platform: "linux"
package: "libx11"
version: "1.8.14-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XkbGetDeviceLedInfo"
---

# XkbGetDeviceLedInfo(3)

Query the indicator names, maps, and state associated with an LED feedback of an input extension device

## NAME

XkbGetDeviceLedInfo - Query the indicator names, maps, and state associated with an LED feedback of an input extension device

## SYNOPSIS

**Status XkbGetDeviceLedInfo** **(Display \****dpy***,** **XkbDeviceInfoPtr** *device\_info***,** **unsigned int** *led\_class***,** **unsigned int** *led\_id***,** **unsigned int** *which***);**

## ARGUMENTS

- *dpy*

  connection to X server

- *device\_info*

  structure to update with results

- *led\_class*

  LED feedback class assigned by input extension

- *led\_id*

  LED feedback ID assigned by input extension

- *which*

  mask indicating desired information

## DESCRIPTION

*XkbGetDeviceLedInfo* queries the server for the desired LED information for the feedback specified by *led\_class* and *led\_id* for the X input extension device indicated by *device\_spec-\>device\_info* and waits for a reply. If successful, *XkbGetDeviceLedInfo* backfills the relevant fields of *device\_info* as determined by *which* with the results and returns Success. Valid values for *which* are the inclusive OR of any of XkbXI\_IndicatorNamesMask, XkbXI\_IndicatorMapsMask, and XkbXI\_IndicatorStateMask.

The fields of *device\_info* that are filled in when this request succeeds are *name, type, supported,* and *unsupported,* and portions of the *leds* structure corresponding to *led\_class* and *led\_id* as indicated by the bits set in *which.* The *device\_info-\>leds* vector is allocated if necessary and *sz\_leds* and *num\_leds* filled in. The *led\_class, led\_id* and *phys\_indicators* fields of the *device\_info-\>leds* entry corresponding to *led\_class* and *led\_id* are always filled in.

If *which* contains XkbXI\_IndicatorNamesMask, the *names\_present* and *names* fields of the *device\_info-\>leds* structure corresponding to *led\_class* and *led\_id* are updated, if *which* contains XkbXI\_IndicatorStateMask, the corresponding *state* field is updated, and if *which* contains XkbXI\_IndicatorMapsMask, the *maps\_present* and *maps* fields are updated.

If a compatible version of Xkb is not available in the server or the Xkb extension has not been properly initialized, *XkbGetDeviceLedInfo* returns BadAccess. If allocation errors occur, a BadAlloc status is returned. If the device has no indicators, a BadMatch error is returned. If *ledClass* or *ledID* have illegal values, a BadValue error is returned. If they have legal values but do not specify a feedback that contains LEDs and is associated with the specified device, a BadMatch error is returned.

## DIAGNOSTICS

- **BadAccess**

  The Xkb extension has not been properly initialized

- **BadAlloc**

  Unable to allocate storage

- **BadMatch**

  A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise invalid

- **BadValue**

  An argument is out of range
