XkbAllocNames(3)
π NAME π
XkbAllocNames β allocate symbolic names structures. This is the XkbAllocNames(3) page, bestie, and it's here to help you allocate those names without doing the absolute most. π
β¨ SYNOPSIS β¨
Status XkbAllocNames (XkbDescPtr xkb, unsigned int which, int num_rg,
int num_key_aliases);
π ARGUMENTS π
xkbβ keyboard description for which names are to be allocated.whichβ mask of names to be allocated.num_rgβ total number of radio group names needed.num_key_aliasesβ total number of key aliases needed.
π¦ DESCRIPTION π¦
Okay so real talk: ngl, most applications do not need to directly allocate symbolic names structures. If your application changes the number of key aliases or radio groups, or constructs a symbolic names structure without loading the necessary components from the X server, do not allocate a names structure directly using malloc or Xmalloc β that is not the move, bestie. Use XkbAllocNames instead. Periodt. π
XkbAllocNames can return BadAlloc, BadMatch, and BadValue errors. The which parameter is the bitwise inclusive OR of the valid names mask bits defined in Table 1. π§Ύ
π§Ύ Table 1 Symbolic Names Masks π§Ύ
Each row is giving mask bit β value β keyboard component β field, and every single one is iconic in its own way:
XkbKeycodesNameMaskβ value(1<<0)β keyboard componentXkb->namesβ fieldkeycodesXkbGeometryNameMaskβ value(1<<1)β keyboard componentXkb->namesβ fieldgeometryXkbSymbolsNameMaskβ value(1<<2)β keyboard componentXkb->namesβ fieldsymbolsXkbPhysSymbolsNameMaskβ value(1<<3)β keyboard componentXkb->namesβ fieldphys_symbolsXkbTypesNameMaskβ value(1<<4)β keyboard componentXkb->namesβ fieldtypeXkbCompatNameMaskβ value(1<<5)β keyboard componentXkb->namesβ fieldcompatXkbKeyTypeNamesMaskβ value(1<<6)β keyboard componentXkb->mapβ fieldtype[*].nameXkbKTLevelNamesMaskβ value(1<<7)β keyboard componentXkb->mapβ fieldtype[*].lvl_names[*]XkbIndicatorNamesMaskβ value(1<<8)β keyboard componentXkb->namesβ fieldindicators[*]XkbKeyNamesMaskβ value(1<<9)β keyboard componentXkb->namesβ fieldkeys[*], num_keysXkbKeyAliasesMaskβ value(1<<10)β keyboard componentXkb->namesβ fieldkey_aliases[*], num_key_aliasesXkbVirtualModNamesMaskβ value(1<<11)β keyboard componentXkb->namesβ fieldvmods[*]XkbGroupNamesMaskβ value(1<<12)β keyboard componentXkb->namesβ fieldgroups[*]XkbRGNamesMaskβ value(1<<13)β keyboard componentXkb->namesβ fieldradio_groups[*], num_rgXkbComponentNamesMaskβ value(0x3f)β keyboard componentXkb->namesβ fieldkeycodes,geometry,symbols,physical symbols,types, andcompatibility mapXkbAllNamesMaskβ value(0x3fff)β keyboard componentXkb->namesβ fieldall name components
π¨ Bestie, do not free symbolic names structures directly usingfreeorXFree. UseXkbFreeNamesinstead. That is the whole vibe check. π«Ά
π 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.
π SEE ALSO π
XkbFreeNames(3)β go see it, bestie. It's the names-freeing lore you need. β¨
Signing off from X Version 11 and libX11 1.8.14 β the footer didn't hand us a date, so no fake date, bestie ππ
bye!
π¦ 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