xcb_xkb_get_kbd_by_name(3)

πŸ“¦
version 1.17.0 Β· 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– xcb_xkb_get_kbd_by_name β€” XCB Requests, section 3 ✨

okay bestie, buckle up, we're in the XCB request pages and this one is literally called xcb_xkb_get_kbd_by_name πŸ’… yes it's a mouthful, no I will not be shortening it, the compiler doesn't care about your feelings.


🌸 NAME 🌸

xcb_xkb_get_kbd_by_name β€” and that's it. That's the whole description. The og page left it blank, so we're all just out here vibing with the name and the name alone 🫢 no cap, that's canon.


✨ SYNOPSIS ✨

first things first, you gotta invite the header in:

#include <xcb/xkb.h>

πŸŽ€ Request function

xcb_xkb_get_kbd_by_name_cookie_t
       xcb_xkb_get_kbd_by_name(xcb_connection_t *conn,
       xcb_xkb_device_spec_t deviceSpec, uint16_t need, uint16_t want,
       uint8_t load);

πŸ¦‹ Reply datastructure

typedef struct xcb_xkb_get_kbd_by_name_reply_t {
    uint8_t       response_type;
    uint8_t       deviceID;
    uint16_t      sequence;
    uint32_t      length;
    xcb_keycode_t minKeyCode;
    xcb_keycode_t maxKeyCode;
    uint8_t       loaded;
    uint8_t       newKeyboard;
    uint16_t      found;
    uint16_t      reported;
    uint8_t       pad0[16];
} xcb_xkb_get_kbd_by_name_reply_t;

look at that padding field just sitting there like a little wallflower πŸ₯Ί pad0[16], we love you, we don't know what you do.

πŸ’œ Reply function

xcb_xkb_get_kbd_by_name_reply_t
       *xcb_xkb_get_kbd_by_name_reply(xcb_connection_t *conn,
       xcb_xkb_get_kbd_by_name_cookie_t cookie,
       xcb_generic_error_t **e);

🌈 Reply accessors

xcb_xkb_get_kbd_by_name_replies_t *xcb_xkb_get_kbd_by_name_replies
(const xcb_xkb_get_kbd_by_name_request_t *reply)

πŸ”₯ REQUEST ARGUMENTS πŸ”₯

  • conn β€” the XCB connection to X11. your lil hotline to the server, iconic, essential, we stan 🌟
  • deviceSpec β€” TODO: NOT YET DOCUMENTED. yeah. the docs said "figure it out yourself" and honestly? relatable πŸ™ˆ
  • need β€” TODO: NOT YET DOCUMENTED. bestie the documentation is not documentationing 😭
  • want β€” TODO: NOT YET DOCUMENTED. want... in THIS economy? πŸ“
  • load β€” TODO: NOT YET DOCUMENTED. ngl we simply do not know. the void stares back πŸ’€

πŸ’– REPLY FIELDS πŸ’–

  • response_type β€” the type of this reply, which in this case is XCB_XKB_GET_KBD_BY_NAME. this field is also chillin' in the xcb_generic_reply_t, and you can use it to tell replies apart from each other, like name tags at a party but for network messages πŸŽ€
  • sequence β€” the sequence number of the last request processed by the X11 server. it's giving "receipt number" energy ✨
  • length β€” the length of the reply, in words. and bc someone will ask: a word is 4 bytes. periodt. πŸ‘‘
  • deviceID β€” TODO: NOT YET DOCUMENTED.
  • minKeyCode β€” TODO: NOT YET DOCUMENTED.
  • maxKeyCode β€” TODO: NOT YET DOCUMENTED.
  • loaded β€” TODO: NOT YET DOCUMENTED.
  • newKeyboard β€” TODO: NOT YET DOCUMENTED.
  • found β€” TODO: NOT YET DOCUMENTED.
  • reported β€” TODO: NOT YET DOCUMENTED.
okay so lowkey a LOT of this page is "TODO: NOT YET DOCUMENTED." and I'm just the messenger bestie, I'm not about to invent lore for fields that the source didn't describe πŸ™… no extra facts, that's the rule, we keep it 100.

🧚 DESCRIPTION 🧚

...and that's the whole section. nothing. an empty room. a silent disco. the og page really said "description: no ❀️" so I'm saying it too. the vibe is mysterious, the facts are absent, and we respect that πŸ’œ


⭐ RETURN VALUE ⭐

so it hands you back an xcb_xkb_get_kbd_by_name_cookie_t β€” a lil cookie, a promise, a future snack πŸͺ and errors? you have to deal with those when you call the reply function xcb_xkb_get_kbd_by_name_reply.

if you'd rather handle errors in the event loop instead of right there, use xcb_xkb_get_kbd_by_name_unchecked. peek xcb-requests(3) for the details, it's the whole explainer 🌈


😭 ERRORS 😭

this request does never generate any errors.

read it again. zero. none. not a single one. the error channel is on do-not-disturb mode and honestly? slay. ✨


🫢 SEE ALSO 🫢

(empty. just vibes. the original had nothing here either, so we're not gonna manifest fake references out of thin air πŸ’…)


πŸ‘‘ AUTHOR πŸ‘‘

generated from xkb.xml. contact xcb@lists.freedesktop.org for corrections and improvements β€” they're the ones you @ when something's off, not me, I'm just the hype woman πŸ“£


k bye bestie, that's the whole page πŸ’– go forth and request your keyboard by name, whatever that ends up meaning πŸŒΈπŸ¦‹βœ¨

X Version 11 Β· libxcb 1.17.0 Β· xcb_xkb_get_kbd_by_name(3) β€” mwah, drink water, and remember: the padding field did nothing wrong πŸŽ€