XkbGetKeyboard(3)
π NAME π
okay bestie, welcome to XkbGetKeyboard(3) from the XKB FUNCTIONS section β this is the one that retrieves one or more components of a keyboard device description. that's the whole name vibe, periodt. β¨
πΈ SYNOPSIS πΈ
the function signature, exactly as printed:
XkbDescPtr XkbGetKeyboard (Display *display, unsigned int which,
unsigned int device_spec);
π ARGUMENTS π
displayβ connection to the X server.device_specβ device ID, orXkbUseCoreKbd.bits_to_changeβ determines events to be selected / deselected.values_for_bitsβ1=>select,0->deselect; for events inbits_to_change.
side note bestie: the SYNOPSIS also has awhichparameter, and DESCRIPTION below explains it. The page's ARGUMENTS list also includesbits_to_changeandvalues_for_bitsβ yes, even though the SYNOPSIS line above doesn't show them. I'm keeping every item exactly as listed. π«Ά
π¦ DESCRIPTION π¦
okay so XkbGetKeyboard allocates and returns a pointer to a keyboard description. It queries the server for those components specified in the which parameter for device device_spec and copies the results to the XkbDescRec it allocated. The remaining fields in the keyboard description are set to NULL. The valid masks for which are those listed in Table 1. π
β Table 1 Mask Bits for XkbDescRec β
each bullet is Mask Bit β XkbDescRec Field β Value:
XkbControlsMaskβctrlsβ(1L<<0)XkbServerMapMaskβserverβ(1L<<1)XkbIClientMapMaskβmapβ(1L<<2)XkbIndicatorMapMaskβindicatorsβ(1L<<3)XkbNamesMaskβnamesβ(1L<<4)XkbCompatMapMaskβcompatβ(1L<<5)XkbGeometryMaskβgeomβ(1L<<6)XkbAllComponentsMaskβAll Fieldsβ(1L<<7)
XkbGetKeyboard is used to read the current description for one or more components of a keyboard device. It calls XkbGetKeyboardByName(3) as follows:
XkbGetKeyboardByName(dpy, device_spec, NULL, which, which, False).
If successful, XkbGetKeyboard returns a pointer to a newly allocated XkbDescRec structure, which is described in XkbGetKeyboardByName(3), and which should be freed with XkbFreeKeyboard(3). If XkbGetKeyboard does not succeed, it returns NULL. π
π DIAGNOSTICS π
BadAllocβ Unable to allocate storage.
π SEE ALSO π
mwah π this page is brought to you by X Version 11 and libX11 1.8.14; the footer has no explicit date printed here, and it signs off as XkbGetKeyboard(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