XkbAllocCompatMap(3)
π XkbAllocCompatMap(3) β XKB FUNCTIONS β¨
πΈ NAME πΈ
XkbAllocCompatMap β allocate a brand-new compatibility map when you donβt already have one available, bestie π
β¨ SYNOPSIS β¨
Status XkbAllocCompatMap (XkbDescPtr xkb, unsigned int which, unsigned
int num_si);
π ARGUMENTS π
xkbβ the keyboard description where the compat map gets allocated.whichβ a mask of compatibility map components to allocate.num_siβ the number of symbol interpretations to allocate.
π DESCRIPTION π
Okay so xkb is the keyboard description for which compatibility maps are gonna be allocated. The compatibility map is literally the compat field inside this structure. β¨
which says which compatibility map components get allocated (peep XkbGetCompatMap for the lore). Itβs an inclusive OR of the bits shown in Table 1, no cap.
Table 1 Compatibility Map Component Masks
XkbSymInterpMaskβ value(1<<0)β affecting: Symbol interpretationsXkbGroupCompatMaskβ value(1<<1)β affecting: Group mapsXkbAllCompatMaskβ value(0x3)β affecting: All compatibility map components
num_si is the total number of entries to allocate in the symbol interpretation vector, aka xkb.compat.sym_interpret.
XkbAllocCompatMap returns Success if successful, BadMatch if xkb is NULL, or BadAlloc if errors are encountered when attempting to allocate storage. Periodt. π
π¦ STRUCTURES π¦
typedef struct {
KeySym sym; /* keysym of interest or NULL */
unsigned char flags; /* XkbSI_AutoRepeat, XkbSI_LockingKey */
unsigned char match; /* specifies how mods is interpreted */
unsigned char mods; /* modifier bits, correspond to eight real modifiers */
unsigned char virtual_mod; /* 1 modifier to add to key virtual mod map */
XkbAnyAction act; /* action to bind to symbol position on key */
} XkbSymInterpretRec,*XkbSymInterpretPtr;
π DIAGNOSTICS π
BadAllocβ Unable to allocate storageBadMatchβ A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise invalid
π SEE ALSO π
XkbGetCompatMap(3)β the friend in the same orbit π«Ά
π NOTES π
Big note, bestie: symbol interpretations in a compatibility map (the sym_interpret vector of XkbSymInterpretRec structures) are also allocated using this same function. To make sure thereβs enough space in the symbol interpretation vector for entries to be added, use XkbAllocCompatMap and specify which as XkbSymInterpretMask, with the number of free symbol interpretations you need in num_si. Do not skip this one. π
β¨
Thatβs the whole iconic page, signed off with X Version 11, libX11 1.8.14, and all the XkbAllocCompatMap(3) footer energy. ππ
π¦ 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