XkbAllocGeomKeys(3)
π XkbAllocGeomKeys β a whole manpage, but make it group chat
okay so bestie, the manual name for this one is XkbAllocGeomKeys(3) β it lives in the XKB FUNCTIONS section of the manual, and today we're gonna make it make sense. π«Ά
β¨ NAME β¨
XkbAllocGeomKeys β literally just allocating space for however many keys you want to add to a row. that's the whole vibe. π
β¨ SYNOPSIS β¨
Status XkbAllocGeomKeys (XkbRowPtr row, int num_needed);
β¨ ARGUMENTS β¨
rowβ the row you want to shove these keys into, bestie. like, the row that keys should be allocated to.num_neededβ the number of new keys you require. how many, queen? tell me how many. π
β¨ DESCRIPTION β¨
okay so real talk: Xkb ships a whole bunch of functions whose entire job is allocating and freeing subcomponents of a keyboard geometry. so if you're out here tryna create or modify keyboard geometries, these are your girls. πΈ
but bestie, listen β like, listen listen. these functions merely allocate space for the new element(s). that's it. that's the job. it is entirely up to you to actually fill in the values explicitly in your code. no cap. they will not do it for you, they will not hold your hand, they will not text you back. π
one thing that's highkey important: these allocation functions increase sz_* but never touch num_* β unless there's an allocation failure, in which case they reset both sz_* and num_* to zero. so yeah, if it all goes sideways, it goes all the way sideways. π
and what do they return? iconic question:
Successβ if they succeed. slay. πBadAllocβ if they're not able to allocate space. πBadValueβ if a parameter is not as expected. as in, not like the other girls.
now for the main character herself: XkbAllocGeomKeys allocates num_needed keys and adds them to the row. and does it initialize them? absolutely not. No initialization of the keys is done. you get uninitialized space and vibes. fill it in yourself. periodt. π₯
β οΈ warning bestie: do NOT assume those keys come pre-filled just because the function returned Success. they do not. allocated space only β the values are your problem now. π«Ά
β¨ DIAGNOSTICS β¨
BadAllocβ Unable to allocate storage. the storage said no. πBadValueβ An argument is out of range. one of your arguments is being extra. π€
that's the whole page, fr fr β go allocate responsibly, bestie. ππ¦
β sign-off: this little love letter comes to you from X Version 11, shipping with libX11 1.8.14 β XkbAllocGeomKeys(3), mwah. π
π¦ 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