xcb_xkb_get_state(3)
π xcb_xkb_get_state β it's giving "XKB state, but make it a request"
okay so bestie, welcome to xcb_xkb_get_state(3) from the XCB Requests corner of the manual. grab a boba, this one's short and sweet π§β¨
πΈ NAME πΈ
xcb_xkb_get_state β that's literally it, the NAME section left the description blank, and honestly? iconic of it. no cap, that's the whole name entry. π
β¨ SYNOPSIS β¨
first up, you gotta pull in the header or nothing works, bestie:
#include <xcb/xkb.h>
π¦ Request function
xcb_xkb_get_state_cookie_t xcb_xkb_get_state(xcb_connection_t *conn,
xcb_xkb_device_spec_t deviceSpec);
π Reply datastructure
this is the lil struct you're gonna be looking at, and yes every field is here, i'm not skipping a single one, that's a promise π«Ά:
typedef struct xcb_xkb_get_state_reply_t {
uint8_t response_type;
uint8_t deviceID;
uint16_t sequence;
uint32_t length;
uint8_t mods;
uint8_t baseMods;
uint8_t latchedMods;
uint8_t lockedMods;
uint8_t group;
uint8_t lockedGroup;
int16_t baseGroup;
int16_t latchedGroup;
uint8_t compatState;
uint8_t grabMods;
uint8_t compatGrabMods;
uint8_t lookupMods;
uint8_t compatLookupMods;
uint8_t pad0;
uint16_t ptrBtnState;
uint8_t pad1[6];
} xcb_xkb_get_state_reply_t;
β Reply function
xcb_xkb_get_state_reply_t
*xcb_xkb_get_state_reply(xcb_connection_t *conn,
xcb_xkb_get_state_cookie_t cookie, xcb_generic_error_t **e);
π₯ REQUEST ARGUMENTS π₯
connβ the XCB connection to X11, obviously. your lil hotline to the server πdeviceSpecβTODO: NOT YET DOCUMENTED.bestie i'm so serious, that's literally what the page says. it's giving "mystery", it's giving "the docs said no" π
π REPLY FIELDS π
response_typeβ the type of this reply, and in this case it'sXCB_XKB_GET_STATE. this field is ALSO chillin' insidexcb_generic_reply_t, so you can use it to tell your replies apart from each other like a little name tag π·οΈsequenceβ the sequence number of the last request the X11 server processed. it's the "wait, where are we in the timeline" number β³lengthβ how long the reply is, in words. and reminder, a word is4bytes. math is math πdeviceIDβTODO: NOT YET DOCUMENTED.modsβTODO: NOT YET DOCUMENTED.baseModsβTODO: NOT YET DOCUMENTED.latchedModsβTODO: NOT YET DOCUMENTED.lockedModsβTODO: NOT YET DOCUMENTED.groupβTODO: NOT YET DOCUMENTED.lockedGroupβTODO: NOT YET DOCUMENTED.baseGroupβTODO: NOT YET DOCUMENTED.latchedGroupβTODO: NOT YET DOCUMENTED.compatStateβTODO: NOT YET DOCUMENTED.grabModsβTODO: NOT YET DOCUMENTED.compatGrabModsβTODO: NOT YET DOCUMENTED.lookupModsβTODO: NOT YET DOCUMENTED.compatLookupModsβTODO: NOT YET DOCUMENTED.ptrBtnStateβTODO: NOT YET DOCUMENTED.
lowkey half this struct is a mystery box and i'm just the messenger π the page said "not yet documented" and i am NOT about to invent lore. no cap.
π DESCRIPTION π
okay so, genuinely, the DESCRIPTION section of this page is... empty. nothing. a void. the silence is loud, bestie ππ³οΈ that's not me skipping it, that's just literally what's there.
π RETURN VALUE π
you get back an xcb_xkb_get_state_cookie_t. and here's the tea: errors have to be handled when you call the reply function, aka xcb_xkb_get_state_reply β οΈ
but if you'd rather handle your errors inside the event loop instead? use xcb_xkb_get_state_unchecked. see xcb-requests(3) for the deets π«Ά
π ERRORS π
this request never generates any errors. not one. zero. it's the chillest request in the whole group chat, it would never start drama πΈ
π SEE ALSO π
bestie the SEE ALSO section is empty too. nothing to link, nothing to peek at. we move. π
π§ AUTHOR π§
generated from xkb.xml. contact xcb@lists.freedesktop.org for corrections and improvements π§
and that's the whole page, periodt π this lil doc came to you from X Version 11, libxcb 1.17.0, and yes it's literally titled xcb_xkb_get_state(3) β slay, go forth, and may all your replies be documented someday πβ¨
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms