XkbLockModifiers(3) XKB FUNCTIONS XkbLockModifiers(3)

# [NAME](#NAME)

XkbLockModifiers - Locks and unlocks any of the eight real keyboard modifiers

# [SYNOPSIS](#SYNOPSIS)

**Bool XkbLockModifiers** **(Display \*display,** **unsigned int device\_spec,** **unsigned int affect,** **unsigned int values);**

# [ARGUMENTS](#ARGUMENTS)

[*display*](#display)

connection to the X server

[*device\_spec*](#device_spec)

device ID, or XkbUseCoreKbd

[*affect*](#affect)

mask of real modifiers whose lock state is to change

[*values*](#values)

1 =&gt; lock, 0 =&gt; unlock; only for modifiers selected by affect

# [DESCRIPTION](#DESCRIPTION)

*XkbLockModifiers* sends a request to the server to lock the real modifiers selected by both *affect* and *values* and to unlock the real modifiers selected by *affect,* but not selected by *values. XkbLockModifiers* does not wait for a reply from the server. It returns True if the request was sent, and False otherwise.

The functions in this section that change the use of modifiers use a mask in the parameter affect. It is a bitwise inclusive OR of the legal modifier masks:

Table 1 Real Modifier Masks Mask ShiftMask LockMask ControlMask Mod1Mask Mod2Mask Mod3Mask Mod4Mask Mod5Mask

# [RETURN VALUES](#RETURN_VALUES)

[True](#True)

The *XkbLockModifiers* function returns True if a request is sent to the server to lock the real modifiers selected by both *affect* and *values* and to unlock the real modifiers selected by *affect,* but not selected by *values.*

[False](#False)

The *XkbLockModifiers* function returns False if the request was not sent.

libX11 1.8.14 X Version 11

---

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