XkbAllocServerMap(3) XKB FUNCTIONS XkbAllocServerMap(3)

# [NAME](#NAME)

XkbAllocServerMap - Allocate and initialize an empty server map description record

# [SYNOPSIS](#SYNOPSIS)

**Status XkbAllocServerMap** **(XkbDescPtr xkb,** **unsigned int which,** **unsigned int count\_acts);**

# [ARGUMENTS](#ARGUMENTS)

[*xkb*](#xkb)

keyboard description in which to allocate server map

[*which*](#which)

mask selecting map components to allocate

[*count\_acts*](#count_acts)

value of num\_acts field in map to be allocated

# [DESCRIPTION](#DESCRIPTION)

*XkbAllocServerMap* allocates and initializes an empty server map in the *server* field of the keyboard description specified by *xkb.* The *which* parameter specifies the particular components of the server map structure to allocate, as specified in Table 1.

Table 1 XkbAllocServerMap Masks Mask Effect XkbExplicitComponentsMask The min\_key\_code and max\_key\_code fields of the xkb parameter are used to allocate the explicit field of the server map. XkbKeyActionsMask The min\_key\_code and max\_key\_code fields of the xkb parameter are used to allocate the key\_acts field of the server map. The count\_acts parameter is used to allocate the acts field of the server map. XkbKeyBehaviorsMask The min\_key\_code and max\_key\_code fields of the xkb parameter are used to allocate the behaviors field of the server map. XkbVirtualModMapMask The min\_key\_code and max\_key\_code fields of the xkb parameter are used to allocate the vmodmap field of the server map.

If the server map of the keyboard description is not NULL and any fields are already allocated in the server map, *XkbAllocServerMap* does not overwrite the existing values. The only exception is with the *acts* array. If the *count\_acts* parameter is greater than the current *num\_acts* field of the server map, *XkbAllocServerMap* resizes the *acts* array and resets the *num\_acts* field accordingly.

If *XkbAllocServerMap* is successful, it returns Success. Otherwise, it can return either BadMatch or BadAlloc errors.

# [DIAGNOSTICS](#DIAGNOSTICS)

[**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

# [NOTES](#NOTES)

The *min\_key\_code* and *max\_key\_code* fields of the *xkb* parameter must be legal values. If they are not valid, *XkbAllocServerMap* returns BadValue.

libX11 1.8.14 X Version 11

---

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