XkbTranslateKeySym(3)
πΈ NAME πΈ
Hey bestie, welcome to XkbTranslateKeySym(3) from the XKB FUNCTIONS manual β the page for finding the string and symbol associated with a keysym for a given keyboard state. Thatβs the whole mission, no cap. π
β¨ SYNOPSIS β¨
The actual signature, verbatim, because we do not mess with code around here:
int XkbTranslateKeySym (Display *dpy, KeySym *sym_inout, unsigned int
mods, char *buf, int nbytes, int *extra_rtrn);
π ARGUMENTS π
dpyβ connection to X server. Your server link, periodt. π«Άsym_inoutβ symbol to be translated; result of translation. It goes in, and the translated result comes back through it. πmodsβ modifiers to apply tosym_inout. π₯bufβ buffer into which returned string is written. πnbytesβ size of buffer in bytes. πextra_rtrnβ number of bytes overflow. π
π¦ DESCRIPTION π¦
Okay so hereβs the tea: XkbTranslateKeySym applies the transformations specified in mods to the symbol specified by sym_inout. β¨
It returns in buf the string, if any, associated with the keysym for the current locale. If the transformations in mods changes the keysym, sym_inout is updated accordingly. If the string returned is larger than nbytes, a count of bytes that does not fit into the buffer is returned in extra_rtrn. XkbTranslateKeySym returns the number of bytes it placed into buf. π
Oversize string? extra_rtrn is literally the count of bytes that didnβt fit. Thatβs the overflow receipt, bestie. π
π RETURN VALUES π
bufβ Returns the string, if any, associated with the keysym for the current locale. π
And yeah, the function itself returns the number of bytes it placed into buf β that detail is in DESCRIPTION, and weβre not leaving it behind. π
π Footer sign-off, bestie: X Version 11, libX11 1.8.14, manual vibes from XKB FUNCTIONS β no separate date on this pageβs footer, just the version stamp. 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