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

# XkbSetXlibControls(3)

Changes the state of the Library Controls

## NAME

XkbSetXlibControls - Changes the state of the Library Controls

## SYNOPSIS

**unsigned int XkbSetXlibControls** **(Display \****display***,** **unsigned long** *bits\_to\_change***,** **unsigned long** *values\_for\_bits***);**

## ARGUMENTS

- *display*

  connection to X server

- *bits\_to\_change*

  selects controls to be modified

- *values\_for\_bits*

  turns selected controls on (1) or off (0)

## DESCRIPTION

*XkbSetXlibControls* modifies the state of the controls selected by *bits\_to\_change;* only the controls selected by *bits\_to\_change* are modified. If the bit corresponding to a control is on in *bits\_to\_change* and also on in *values\_for\_bits,* the control is enabled. If the bit corresponding to a control is on in *bits\_to\_change* but off in *values\_for\_bits,* the control is disabled. *bits\_to\_change* should be an inclusive OR of bits from Table 1.

| | |
| --- | --- |
| Table 1 Library Control Masks |
| Library Control Mask | Value |
| XkbLC\_ForceLatin1Lookup | (1 \<\< 0) |
| XkbLC\_ConsumeLookupMods | (1 \<\< 1) |
| XkbLC\_AlwaysConsumeShiftAndLock | (1 \<\< 2) |
| XkbLC\_IgnoreNewKeyboards | (1 \<\< 3) |
| XkbLC\_ConsumeKeysOnComposeFail | (1 \<\< 29) |
| XkbLC\_ComposeLED | (1 \<\< 30) |
| XkbLC\_BeepOnComposeFail | (1 \<\< 31) |
| XkbLC\_AllControls | (0xc0000007) |

## RETURN VALUES

- (1 \<\< 0)

  XkbLC\_ForceLatin1Lookup

- (1 \<\< 1)

  XkbLC\_ConsumeLookupMods

- (1 \<\< 2)

  XkbLC\_AlwaysConsumeShiftAndLock

- (1 \<\< 3)

  XkbLC\_IgnoreNewKeyboards

- (1 \<\< 29)

  XkbLC\_ConsumeKeysOnComposeFail

- (1 \<\< 30)

  XkbLC\_ComposeLED

- (1 \<\< 31)

  XkbLC\_BeepOnComposeFail

- (0xc0000007)

  XkbLC\_AllControls
