XkbKeySymsPtr(3)
β¨ XkbKeySymsPtr(3) β¨
okay bestie, so this one lives in the XKB FUNCTIONS corner of the libX11 universe, and it's genuinely such a vibe. let me put you on π
πΈ NAME πΈ
XkbKeySymsPtr β returns the pointer to the two-dimensional array of keysyms for the key corresponding to keycode
like, it hands you the keysym grid for the key you asked about. that's the whole gig. no cap. π«Ά
π¦ SYNOPSIS π¦
KeySym * XkbKeySymsPtr (XkbDescPtr xkb, KeyCode keycode);
π ARGUMENTS π
xkbβ the Xkb description of interest π (the one you actually care about)keycodeβ the keycode of interest. yes literally that one. the key you're obsessed with π₯
π DESCRIPTION π
okay so here's the lore π§
the key width and the number of groups associated with a key get used to form a cute little two-dimensional array of KeySyms for a key. and bestie, this array can be different sizes for different keys β it's giving main character energy, every key is built different π
the array for a single key is stored as a linear list, in row-major order. and the arrays for all of the keys live in the syms field of the client map. periodt.
so the layout is:
- one row for each group associated with a key
- one column for each level
and the index corresponding to a given group and shift level is computed as:
idx = group_index * key_width + shift_level
iconic formula, no notes β¨
and to actually get to the beginning of the array? you use the offset field of the key_sym_map entry for a key. that's the doorway. that's the access point. iykyk πͺ
so yeah β XkbKeySymsPtr returns the pointer to the two-dimensional array of keysyms for the key corresponding to keycode. that's it, that's the function, and it ate π
ngl it's literally just a pointer-returning lookup, but the pointer is the whole point, so don't sleep on it π
π SEE ALSO π
(this page doesn't list any SEE ALSO references, bestie β so there's nothing extra to link here, and we're not out here inventing them fr fr π)
X Version 11 Β· libX11 1.8.14 Β· XkbKeySymsPtr(3)
mwah, that's the whole page!! π go forth and pointer responsibly, queen ππ¦πΈ
π¦ 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