xcb_query_keymap(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_query_keymap β€” from the xcb manual, section 3 πŸŽ€

okay bestie, so this is a page from the XCB requests manual, aka the thing that lets you talk to your X11 server without losing your whole entire mind. buckle up, we're querying a keymap and it's lowkey iconic ✨


🌸 NAME 🌸

xcb_query_keymap β€” (yes the description here is literally blank in the original, she's mysterious, she's giving nothing and everything πŸ’€)


πŸ¦‹ SYNOPSIS πŸ¦‹

First things first, you gotta include the header:

#include <xcb/xproto.h>

✨ Request function ✨

xcb_query_keymap_cookie_t xcb_query_keymap(xcb_connection_t *conn,
not me noticing the original literally trails off mid-signature πŸ™ˆ but that's exactly what it says, so that's exactly what you get, no cap

πŸŽ€ Reply datastructure πŸŽ€

typedef struct xcb_query_keymap_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint8_t  keys[32];
} xcb_query_keymap_reply_t;

🫢 Reply function 🫢

xcb_query_keymap_reply_t *xcb_query_keymap_reply(xcb_connection_t *conn,
       xcb_query_keymap_cookie_t cookie, xcb_generic_error_t **e);

πŸ’– REQUEST ARGUMENTS πŸ’–

  • conn β€” the XCB connection to X11. your lil hotline to the server, she's the main character fr fr πŸ‘‘

⭐ REPLY FIELDS ⭐

  • response_type β€” the type of this reply, and in this case it's XCB_QUERY_KEYMAP. this field also lives inside xcb_generic_reply_t, so you can use it to tell your replies apart from each other. it's giving name tag at a party πŸŽ€
  • sequence β€” the sequence number of the last request processed by the X11 server. keeping receipts, periodt πŸ“‹
  • length β€” the length of the reply, in words. and heads up bestie, a word is 4 bytes around here. do not forget that or you WILL be confused later 😭
  • keys β€” TODO: NOT YET DOCUMENTED. yeah babe, the docs said "we'll get to it" and then never got to it πŸ’€

🌈 DESCRIPTION 🌈

this section is empty in the original. nothing. void. a whole vibe check that returned no results πŸ¦‹

πŸ”₯ RETURN VALUE πŸ”₯

Returns an xcb_query_keymap_cookie_t. the tea is: errors have to be handled when you call the reply function, xcb_query_keymap_reply. so handle them, bestie, don't be out here ignoring your errors πŸ’…

If you'd rather handle errors in the event loop instead, use xcb_query_keymap_unchecked. and if you want the full lore on how requests work, go read xcb-requests(3), it's required reading, iykyk πŸ“š


πŸ’€ ERRORS πŸ’€

This request does never generate any errors.

like, none. zero. she's perfect, she's unproblematic, she has never once caused drama 🌸 (respectfully, enjoy it while it lasts)


πŸ‘‘ SEE ALSO πŸ‘‘

this section is empty in the original. no references, no friends, just vibes πŸ™ˆ

🧚 AUTHOR 🧚

Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements. so if something's wrong, that's the inbox, don't @ me πŸ’œ


okay that's the whole page!! this came out of the X Version 11 line, libxcb 1.17.0, and if you ever need her again she lives at xcb_query_keymap(3). slay, go forth, query those keymaps πŸ’–βœ¨πŸŽ€