xcb_get_keyboard_mapping(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_get_keyboard_mapping β€” a lil' XCB request, bestie πŸ’–

okay so we're in the xcb_get_keyboard_mapping(3) girlies' section of the manual, part of XCB Requests (that's the libxcb squad, X Version 11 energy). she has no tagline in the NAME line, she's mysterious like that. let's get into it πŸŽ€


✨ NAME ✨

xcb_get_keyboard_mapping β€” and honestly? the original left the description blank. iconic silent queen behavior, we respect it πŸ’…


🌸 SYNOPSIS 🌸

first up, the include, don't forget her:

#include <xcb/xproto.h>

πŸ¦‹ Request function

xcb_get_keyboard_mapping_cookie_t
xcb_get_keyboard_mapping(xcb_connection_t *conn,
                         xcb_keycode_t first_keycode, uint8_t count);

πŸ¦‹ Reply datastructure

typedef struct xcb_get_keyboard_mapping_reply_t {
    uint8_t  response_type;
    uint8_t  keysyms_per_keycode;
    uint16_t sequence;
    uint32_t length;
    uint8_t  pad0[24];
} xcb_get_keyboard_mapping_reply_t;

πŸ¦‹ Reply function

xcb_get_keyboard_mapping_reply_t
*xcb_get_keyboard_mapping_reply(xcb_connection_t *conn,
                                xcb_get_keyboard_mapping_cookie_t cookie,
                                xcb_generic_error_t **e);

πŸ¦‹ Reply accessors

these are the lil' helper besties that go digging inside the reply for you:

xcb_keysym_t *xcb_get_keyboard_mapping_keysyms(const
        xcb_get_keyboard_mapping_request_t *reply);

int xcb_get_keyboard_mapping_keysyms_length(const
        xcb_get_keyboard_mapping_reply_t *reply);

xcb_generic_iterator_t xcb_get_keyboard_mapping_keysyms_end(const
        xcb_get_keyboard_mapping_reply_t *reply);

πŸ“ REQUEST ARGUMENTS πŸ“

  • conn β€” the XCB connection to X11. she's the whole line to the server, no conn no vibes 🫢
  • first_keycode β€” TODO: NOT YET DOCUMENTED. yeah bestie, even the manual is like "idk yet" 😭 the lore is still loading.
  • count β€” also TODO: NOT YET DOCUMENTED. same energy, same mystery, we move πŸ’€

⭐ REPLY FIELDS ⭐

  • response_type β€” the type of this reply, in this case XCB_GET_KEYBOARD_MAPPING. this field is also chillin' inside the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. main character identifier energy πŸ‘‘
  • sequence β€” the sequence number of the last request the X11 server processed. it's giving receipt 🧾
  • length β€” the length of the reply, in words. and lowkey important: a word is 4 bytes, don't forget that math bestie πŸ”₯
  • keysyms_per_keycode β€” TODO: NOT YET DOCUMENTED. yep. another one. the docs really said "not today" πŸ™ˆ

🌈 DESCRIPTION 🌈

so... the DESCRIPTION section is literally empty. not a single word. she said nothing and left ✨ we simply respect the silence.


πŸ’œ RETURN VALUE πŸ’œ

Returns an xcb_get_keyboard_mapping_cookie_t. and here's the tea: errors have to be handled when you call the reply function xcb_get_keyboard_mapping_reply.

if you'd rather handle errors in the event loop instead, use xcb_get_keyboard_mapping_unchecked. see xcb-requests(3) for the details, bestie, she explains the whole cookie situation πŸͺ


πŸŽ€ ERRORS πŸŽ€

This request does never generate any errors. not a one. zero drama, zero errors, absolute peace and quiet. obsessed 😌

🧚 SEE ALSO 🧚

...nothing listed. empty. a blank little space where the references would go. it's giving minimalism πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. so if something's off, that's the inbox, fr fr 🫢


okay and for the cute sign-off: this whole thing lives under X Version 11, shipped with libxcb 1.17.0, and it's the xcb_get_keyboard_mapping(3) page. that's the footer, that's the vibe, thanks for coming to my ted talk, bye bestie πŸ’–βœ¨πŸ¦‹πŸŒΈπŸŽ€