XkbGetKeySyms(3)

πŸ’– NAME πŸ’–

okay so this is XkbGetKeySyms(3) from the XKB FUNCTIONS manual, and it is literally here to obtain the symbols for a subset of the keys in a keyboard description ✨. That’s the whole vibe: you have a slice of keys, you want their syms, and this function is the main character that fetches them for you πŸ’….

✨ SYNOPSIS ✨

Status XkbGetKeySyms (Display *dpy, unsigned int first, unsigned int num, XkbDescPtr xkb);

πŸŽ€ ARGUMENTS πŸŽ€

  • dpy β€” connection to X server. your server connection, your whole situation 🫢
  • first β€” keycode of first key to get. like, where the key party starts πŸ”₯
  • num β€” number of keycodes for which syms desired. how many keys you’re pulling into the group chat πŸ’¬
  • xkb β€” Xkb description to be updated. the Xkb description getting the glow-up πŸ¦‹

πŸ’… DESCRIPTION πŸ’…

XkbGetKeySyms sends a request to the server to obtain the set of keysyms bound to num keys starting with the key whose keycode is first πŸ‘‘. Then it waits for a reply and returns the keysyms in the map.syms field of xkb ⭐. If it’s successful, XkbGetKeySyms returns Success. The xkb parameter must be a pointer to a valid Xkb keyboard description β€” no fake vibes, bestie, it has to be valid πŸ’―.

If the client map in the xkb parameter has not been allocated, XkbGetKeySyms allocates and initializes it before obtaining the symbols 🧚. That’s the β€œwe built the container first” energy.

⚠️ okay but the error lore is real: if a compatible version of Xkb is not available in the server or the Xkb extension has not been properly initialized, XkbGetKeySyms returns BadAccess. If num is less than 1 or greater than XkbMaxKeyCount, XkbGetKeySyms returns BadValue. And if any allocation errors occur, XkbGetKeySyms returns BadAlloc 😭.

πŸ”₯ RETURN VALUES πŸ”₯

  • Success β€” The XkbGetKeySyms function returns Success if it gets a reply to a request to the server to obtain the set of keysyms bound to num keys starting with the key whose keycode is first. slay, a reply came through πŸ’–

🩷 DIAGNOSTICS 🩷

  • BadAccess β€” The Xkb extension has not been properly initialized.
  • BadAlloc β€” Unable to allocate storage.
  • BadValue β€” An argument is out of range.

source/version check, bestie: this is X Version 11, libX11 1.8.14 β€” XkbGetKeySyms(3) out, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from