xcb_set_modifier_mapping(3)
π xcb_set_modifier_mapping β bestie's guide to rewriting the modifier map π
okay so. this is a page from libxcb, manual section 3 (that's the library-functions girlies, iykyk). the function is xcb_set_modifier_mapping β and if you look at the original NAME line it's literally just the name and a dash with nothing after it. the manpage said "xcb_set_modifier_mapping -" and then dipped. iconic honestly. we move. β¨
πΈ SYNOPSIS πΈ
first up, the include. you're gonna need it:
#include <xcb/xproto.h>
π Request function π
xcb_set_modifier_mapping_cookie_t
xcb_set_modifier_mapping(xcb_connection_t *conn,
uint8_t keycodes_per_modifier, const xcb_keycode_t *keycodes);
π¦ Reply datastructure π¦
typedef struct xcb_set_modifier_mapping_reply_t {
uint8_t response_type;
uint8_t status;
uint16_t sequence;
uint32_t length;
} xcb_set_modifier_mapping_reply_t;
π Reply function π
xcb_set_modifier_mapping_reply_t
*xcb_set_modifier_mapping_reply(xcb_connection_t *conn,
xcb_set_modifier_mapping_cookie_t cookie,
xcb_generic_error_t **e);
β¨ REQUEST ARGUMENTS β¨
connβ the XCB connection to X11. your lil hotline to the server, bestie π«Άkeycodes_per_modifierβ TODO: NOT YET DOCUMENTED. yeah. the manpage itself said that. no cap. πkeycodesβ TODO: NOT YET DOCUMENTED. also that. the mystery continues π
fr fr the upstream docs left these two as TODO and i'm not about to make stuff up, so we're all just gonna sit with the not-knowing together. that's the vibe check.
π REPLY FIELDS π
response_typeβ the type of this reply. in this case it'sXCB_SET_MODIFIER_MAPPING. this field is also hanging out in thexcb_generic_reply_t, so you can use it to tell replies apart from each other. main character field honestly πsequenceβ the sequence number of the last request processed by the X11 server. it's giving receipt π§Ύlengthβ how long the reply is, in words. and heads up, a word is 4 bytes here. not 2. don't come for me πstatusβ one of these values:XCB_MAPPING_STATUS_SUCCESSβ TODO: NOT YET DOCUMENTED. βXCB_MAPPING_STATUS_BUSYβ TODO: NOT YET DOCUMENTED. β³XCB_MAPPING_STATUS_FAILUREβ TODO: NOT YET DOCUMENTED. π- and then... TODO: NOT YET DOCUMENTED. yeah there's just a whole extra dangling TODO sitting there in the list with no name attached. we love a mystery queen π
π« DESCRIPTION π«
so like. the DESCRIPTION section in the original? completely empty. nothing. zero. a void. she said nothing and left π¦
β RETURN VALUE β
it hands you back an xcb_set_modifier_mapping_cookie_t. and listen β errors have to be handled when you call the reply function xcb_set_modifier_mapping_reply. that's the whole deal.
but if you'd rather handle errors in the event loop instead? use xcb_set_modifier_mapping_unchecked. see xcb-requests(3) for details. go read it, i'll wait π
π₯ ERRORS π₯
this request does never generate any errors. none. zero. she's unproblematic, periodt β¨
π SEE ALSO π
...nothing. the SEE ALSO section is empty. literally an empty room. no references. no friends listed. she's mysterious like that π
π§ AUTHOR π§
generated from xproto.xml. if you want corrections and improvements, hit up xcb@lists.freedesktop.org. they're the ones who can fix the TODOs, not me π
okay that's the whole page bestie!! and for the lil sign-off β this was X Version 11, from libxcb 1.17.0, and the page itself is xcb_set_modifier_mapping(3). love u, go forth and map those modifiers πβ¨ππ¦
π¦ 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