XkbAddGeomOverlayRow(3)
β¨ XkbAddGeomOverlayRow β bestie edition β¨
okay so this is a page from the XKB FUNCTIONS manual (yes, the X11 keyboard geometry girlies) and honestly? it's a little niche but we're gonna slay it together π
πΈ NAME πΈ
XkbAddGeomOverlayRow β adds a row to an existing overlay, that's literally the whole vibe π
π¦ SYNOPSIS π¦
XkbOverlayRowPtr XkbAddGeomOverlayRow (XkbOverlayPtr overlay, XkbRowPtr
row_under, int sz_keys);
like look at that signature. the way that it returns an XkbOverlayRowPtr. iconic.
π ARGUMENTS π
overlayβ the overlay you're updating. it's the main character here, we're adding to it π«Άrow_underβ the row that's getting overlaid in the section overlay overlays. iykyk.sz_keysβ how many keys you want reserved in the row. make it a number bestie, not a vibe.
π DESCRIPTION π
so here's the lore: Xkb gives you functions to add a single new element to the top-level keyboard geometry. in each case, the num_ * fields of the corresponding structure get incremented by 1 β¨ that's the rule.
β οΈ important: these functions do not change sz_* unless there is no more room in the array. no cap.
some of these functions fill in the values of the element's structure straight from the arguments. for other functions? you gotta explicitly write code to fill the structure's elements yourself. lowkey annoying but we move π
the top-level geometry description includes a list of geometry properties. a geometry property associates an arbitrary string with an equally arbitrary name. programs that display images of keyboards can use geometry properties as hints, but they are not interpreted by Xkb. and no other geometry structures refer to geometry properties. periodt. π
okay, now the actual function:
XkbAddGeomOverlayRow adds one row to the overlay. the new row contains space for sz_keys keys.
π ifrow_underspecifies a row that doesn't exist on the underlying section,XkbAddGeomOverlayRowreturnsNULLand doesn't change the overlay. it also returnsNULLif any of the parameters is empty or if it was not able to allocate space for the overlay. so likeβ¦ check your returns, bestie. please. π
π§ STRUCTURES π§
typedef struct _XkbOverlayRow {
unsigned short row_under; /* index into the row under this overlay row */
unsigned short num_keys; /* number of keys in the keys array */
unsigned short sz_keys; /* size of the keys array */
XkbOverlayKeyPtr keys; /* array of keys in the overlay row */
} XkbOverlayRowRec,*XkbOverlayRowPtr;
four fields, all accounted for, all comments copied exactly, we don't skip the boring parts in this house π the keys pointer? XkbOverlayKeyPtr. ate. π₯
π reminder that these are raw unsigned shorts and pointers, so if you're hand-filling keys yourself, that's on you β the manpage literally said some functions don't do it for you. just saying.
and that's the whole page, diva π this beauty came to you courtesy of X Version 11 / libX11 1.8.14 β go forth and overlay those rows, and remember: NULL means no change, so don't come for the overlay when it didn't update. 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