xcb_get_keyboard_control(3)
π xcb_get_keyboard_control(3) β the XCB Requests girlies' guide
okay so bestie, welcome to the <xcb/xproto.h> corner of the X universe π¦ this is the xcb_get_keyboard_control page, straight out of the XCB Requests section, and we're gonna read it together, no skimming, no cap.
β¨ NAME β¨
xcb_get_keyboard_control β literally the request that asks the X server "hey girl, what's the keyboard doing rn?" π
(the original name line is just the function name with a lil empty space after it β iconique, minimal, no notes π)
πΈ SYNOPSIS πΈ
First things first, you gotta pull in the header:
#include <xcb/xproto.h>
π«Ά Request function
xcb_get_keyboard_control_cookie_t
xcb_get_keyboard_control(xcb_connection_t *conn,
yes the signature just... ends there in the source. it's giving cliffhanger π we keep it exactly as it is, periodt.
π Reply datastructure
typedef struct xcb_get_keyboard_control_reply_t {
uint8_t response_type;
uint8_t global_auto_repeat;
uint16_t sequence;
uint32_t length;
uint32_t led_mask;
uint8_t key_click_percent;
uint8_t bell_percent;
uint16_t bell_pitch;
uint16_t bell_duration;
uint8_t pad0[2];
uint8_t auto_repeats[32];
} xcb_get_keyboard_control_reply_t;
look at her. struct queen. pad0[2] is padding, she's just there for the alignment vibes β¨
π§ Reply function
xcb_get_keyboard_control_reply_t
*xcb_get_keyboard_control_reply(xcb_connection_t *conn,
xcb_get_keyboard_control_cookie_t cookie,
xcb_generic_error_t **e);
π₯ REQUEST ARGUMENTS π₯
connβ The XCB connection to X11. your lil pipeline to the server bestie, she's the whole main character here π
π REPLY FIELDS π
response_typeβ The type of this reply, in this caseXCB_GET_KEYBOARD_CONTROL. This field is also present in thexcb_generic_reply_tand can be used to tell replies apart from each other. it's the name tag at the party πsequenceβ The sequence number of the last request processed by the X11 server. lowkey your receipt number fr fr π§Ύlengthβ The length of the reply, in words (a word is 4 bytes). not bytes, bestie β words. four bytes each. do not come for me πglobal_auto_repeatβ One of the following values:XCB_AUTO_REPEAT_MODE_OFFβ TODO: NOT YET DOCUMENTED.XCB_AUTO_REPEAT_MODE_ONβ TODO: NOT YET DOCUMENTED.XCB_AUTO_REPEAT_MODE_DEFAULTβ TODO: NOT YET DOCUMENTED.- TODO: NOT YET DOCUMENTED.
okay so that last one is just... floating there. a stray TODO with no field name, no value, no nothing. she's mysterious, she's unlabeled, we are NOT deleting her π
led_maskβ TODO: NOT YET DOCUMENTED.key_click_percentβ TODO: NOT YET DOCUMENTED.bell_percentβ TODO: NOT YET DOCUMENTED.bell_pitchβ TODO: NOT YET DOCUMENTED.bell_durationβ TODO: NOT YET DOCUMENTED.auto_repeatsβ TODO: NOT YET DOCUMENTED.
not a single field got documented, and honestly? we respect the transparency. the TODO girlies are all just standing there, holding their little TODO: NOT YET DOCUMENTED. signs π we preserve them exactly, every single one, no edits, no guessing π«Ά
π DESCRIPTION π
...the original section is literally empty. nothing. a blank space. a moment of silence. she said "no thoughts, head empty" and meant it π and we are keeping it that way because the facts do not change, even when the facts are nothing.
β RETURN VALUE β
Returns an xcb_get_keyboard_control_cookie_t. Errors have to be handled when calling the reply function xcb_get_keyboard_control_reply.
If you want to handle errors in the event loop instead, use xcb_get_keyboard_control_unchecked. See xcb-requests(3) for details.
so it's a cookie πͺ you get the cookie first, then you come back for the actual reply. that's the whole bit. and if you'd rather catch your errors in the event loop, take the_uncheckedroute instead βxcb-requests(3)has the tea.
π ERRORS π
This request does never generate any errors.
not a single one. zero. she's unbothered, moisturized, in her lane β¨
π SEE ALSO π
...the original lists nothing here. the SEE ALSO section is just a title and then silence. it's giving "no further reading, you're already perfect" π
π AUTHOR π
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
if something's off, hit up that mailing list bestie, they want the feedback fr fr π
and that's the whole page!! every field, every TODO: NOT YET DOCUMENTED., every cookie, every word-length clarification, all preserved, all accounted for, no details harmed in the making of this rewrite π«Ά
this whole thing lives in X Version 11, from libxcb 1.17.0 β that's the source and version energy at the bottom, and that's your cute lil sign-off from me to you π slay, stay connected, and always handle your errors. periodt. β¨
π¦ 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