XkbGetDeviceLedInfo(3) XKB FUNCTIONS XkbGetDeviceLedInfo(3)

# [NAME](#NAME)

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

# [SYNOPSIS](#SYNOPSIS)

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

# [ARGUMENTS](#ARGUMENTS)

[*dpy*](#dpy)

connection to X server

[*device\_info*](#device_info)

structure to update with results

[*led\_class*](#led_class)

LED feedback class assigned by input extension

[*led\_id*](#led_id)

LED feedback ID assigned by input extension

[*which*](#which)

mask indicating desired information

# [DESCRIPTION](#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-&gt;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-&gt;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-&gt;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-&gt;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](#DIAGNOSTICS)

[**BadAccess**](#BadAccess)

The Xkb extension has not been properly initialized

[**BadAlloc**](#BadAlloc)

Unable to allocate storage

[**BadMatch**](#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**](#BadValue)

An argument is out of range

libX11 1.8.14 X Version 11

---

Document: XkbGetDeviceLedInfo(3) from libx11 1.8.14-r1 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libx11.git
