XkbAllocServerMap(3)
β¨ NAME β¨
Okay bestie, welcome to XkbAllocServerMap(3) from the XKB FUNCTIONS manual. This one is all about allocating and initializing an empty server map description record. π
β¨ SYNOPSIS β¨
Status XkbAllocServerMap (XkbDescPtr xkb, unsigned int which, unsigned
int count_acts);
π ARGUMENTS π
xkbβ the keyboard description where you want to allocate the server map, bestie.whichβ a mask that selects which map components to allocate. It's giving "choose your fighter." πcount_actsβ the value for thenum_actsfield in the map that's getting allocated.
πΈ DESCRIPTION πΈ
So XkbAllocServerMap allocates and initializes an empty server map in the server field of the keyboard description specified by xkb, no cap. The which parameter says which particular components of the server map structure to allocate, exactly as listed in Table 1. π
π¦ Table 1: XkbAllocServerMap Masks π¦
XkbExplicitComponentsMaskβ Themin_key_codeandmax_key_codefields of thexkbparameter are used to allocate theexplicitfield of the server map.XkbKeyActionsMaskβ Themin_key_codeandmax_key_codefields of thexkbparameter are used to allocate thekey_actsfield of the server map. Thecount_actsparameter is used to allocate theactsfield of the server map.XkbKeyBehaviorsMaskβ Themin_key_codeandmax_key_codefields of thexkbparameter are used to allocate thebehaviorsfield of the server map.XkbVirtualModMapMaskβ Themin_key_codeandmax_key_codefields of thexkbparameter are used to allocate thevmodmapfield 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 π
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.
β 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. So yeah, keep those codes legal or the function is gonna have a whole moment. π
Cute little footer sign-off, bestie: this page comes from X Version 11, libX11 1.8.14, and it's the XkbAllocServerMap(3) page. The original footer does not show a date, so I'm not inventing oneβperiodt. π
β¨
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms