XkbLookupKeyBinding(3)
π NAME π
Okay so you've landed on the <rainbow>XKB FUNCTIONS</rainbow> page for XkbLookupKeyBinding(3), bestie β and it does exactly what the name says: Find the string bound to a key by XRebindKeySym π
β¨
β¨ SYNOPSIS β¨
int XkbLookupKeyBinding (Display *dpy, KeySym sym, unsigned int state,
char *buf, int nbytes, int *extra_rtrn);
π ARGUMENTS π
dpyβ connection to server.symβ connection to server. (Yep, the page says this forsymtoo β not me, I'm just reporting the tea βπ)stateβ state for which string is to be looked up.bufβ buffer into which returned string is written.nbytesβ size of buffer in bytes.extra_rtrnβ backfilled with number bytes overflow.
πΈ DESCRIPTION πΈ
XkbLookupKeyBinding is the equivalent of the core XLookupString function. No cap. π«Ά
XRebindKeysym binds an ASCII string to a specified keysym, so that the string and keysym are returned when the key is pressed and a specified list of modifiers are also being held down. That's the whole vibe: key + modifiers + string, all matched up. π
XkbLookupKeyBinding returns in buf the string associated with the keysym sym and modifier state state. buf is NULL terminated unless there's an overflow. π«§
If the string returned is larger than nbytes, a count of bytes that does not fit into the buffer is returned in extra_rtrn. So if it's giving too-big-for-the-buffer energy, extra_rtrn tells you how many bytes didn't make it. π
And bestie, the last line of the description says XkbTranslateKeySym returns the number of bytes that it placed into buf β yes, that's the exact function name in the text, keep it that way. π
π¦ SEE ALSO π¦
That's the whole page, bestie β signed, sealed, and slayed by <rainbow>X Version 11</rainbow> + <rainbow>libX11 1.8.14</rainbow> for XkbLookupKeyBinding(3) β¨π
π
π¦ 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