XkbKeySymEntry(3)
π XkbKeySymEntry β the manual page, but make it make sense
okay so real talk bestie, this is a page from the XKB FUNCTIONS corner of the X world, and it's genuinely not that deep. it's one function, four arguments, and one very important formula. stay with me π«Ά
πΈ NAME πΈ
XkbKeySymEntry β literally just goes "hey, what keysym lives at this shift level and this group for this keycode" and returns it. that's the whole gig. it's pulling a value out of the two-dimensional array of keysyms for the key corresponding to keycode. iconic behavior, no notes β¨
π¦ SYNOPSIS π¦
KeySym XkbKeySymEntry (XkbDescPtr xkb, KeyCode keycode, int shift, int grp);
π ARGUMENTS π
xkbβ the Xkb description you care about. this is your whole vibe check context, everything lives in here πkeycodeβ the keycode of interest. yes. the key you're curious about. that one π«Άshiftβ the shift level of interest, bestie. which level we're looking at π₯grpβ the group of interest. groups are a thing, we respect them π
π DESCRIPTION π
okay so here's the tea β. every key has a key width and a number of groups, and those two things get used to form a small two-dimensional array of KeySyms for that key. and the cute part? this array can be a different size for different keys. no cap. they're not all the same, and that's fine, that's the design.
the array for a single key is stored as a linear list, in row-major order β so it's a 2D vibe living in a 1D body, iykyk π.
the arrays for all of the keys are stored in the syms field of the client map. and the layout is:
- one row for each group associated with a key
- one column for each level
so if you ever need the index for a given group and shift level, you compute it like this:
idx = group_index * key_width + shift_level
slay. that's it. that's the math π§
and to actually find where a key's array starts? you use the offset field of the key_sym_map entry for that key β that's what points you at the beginning of the array. think of it as the little map pin π
lastly, the function itself: XkbKeySymEntry returns the keysym corresponding to shift level shift and group grp from the two-dimensional array of keysyms for the key corresponding to keycode. literally exactly what the NAME section said. consistency queen π
no error codes, no exit statuses, no environment variables on this page β it's a clean little getter and we love that for it π
β a very cute sign-off β
this page came to you courtesy of X Version 11 and libX11 1.8.14, and yeah, it's XkbKeySymEntry(3) β the one, the only, the main character of this manpage ππ go forth and index responsibly, bestie π¦
π¦ 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