XkbGetKeyBehaviors(3)

XkbGetKeyBehaviors(3) is your girl from the XKB FUNCTIONS manual, and she’s here to pull the behaviors array for a subset of keys from the server. bestie, we’re locked in πŸ’…βœ¨

πŸ¦‹ NAME πŸ¦‹

XkbGetKeyBehaviors β€” obtain the behaviors (the behaviors array) for a subset of the keys in a keyboard description from the server.

✨ SYNOPSIS ✨

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

πŸ’– ARGUMENTS πŸ’–

  • dpy β€” connection to server. yes, the whole server-connection situation.
  • first β€” keycode of first key to get. like, where the key range starts.
  • num β€” number of keys for which behaviors are desired. how many keys we’re grabbing behaviors for.
  • xkb β€” Xkb description to contain the result. the container for the result, no cap.

🌸 DESCRIPTION 🌸

okay so XkbGetKeyBehaviors sends a request to the server to obtain the behaviors for num keys on the keyboard starting with the key whose keycode is first. it waits for a reply and returns the behaviors in the server->behaviors field of xkb. if successful, XkbGetKeyBehaviors returns Success. slay.

if the server map in the xkb parameter has not been allocated, XkbGetKeyBehaviors allocates and initializes it before obtaining the actions. noted, bestie.

🚨 error vibe check: if the server does not have a compatible version of Xkb, or the Xkb extension has not been properly initialized, XkbGetKeyBehaviors returns BadAccess. if num is less than 1 or greater than XkbMaxKeyCount, XkbGetKeyBehaviors returns BadValue. if any allocation errors occur, XkbGetKeyBehaviors returns BadAlloc.

πŸŽ€ DIAGNOSTICS πŸŽ€

  • BadAccess β€” The Xkb extension has not been properly initialized πŸ’€
  • BadAlloc β€” Unable to allocate storage 😭
  • BadValue β€” An argument is out of range πŸ™ˆ

that’s the whole page, bestie β€” brought to you by X Version 11 and libX11 1.8.14. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from