XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING(3)
πΈ xcb_input_get_device_modifier_mapping(3) πΈ
okay bestie, welcome to the libxcb zone, this one lives in section 3 of the manual and its whole name is xcb_input_get_device_modifier_mapping π
it's an XCB request, it's giving XInput energy, and honestly? it's a whole vibe. let's get into it π«Ά
β¨ NAME β¨
xcb_input_get_device_modifier_mapping β and that's it, that's the name, the manpage literally just leaves it hanging there like a text with no follow-up π so we move on, no cap.
β¨ SYNOPSIS β¨
first things first, you gotta pull in the header or none of this works:
#include <xcb/xinput.h>
π Request function
xcb_input_get_device_modifier_mapping_cookie_t
xcb_input_get_device_modifier_mapping(xcb_connection_t *conn,
uint8_t device_id);
π¦ Reply datastructure
typedef struct xcb_input_get_device_modifier_mapping_reply_t {
uint8_t response_type;
uint8_t xi_reply_type;
uint16_t sequence;
uint32_t length;
uint8_t keycodes_per_modifier;
uint8_t pad0[23];
} xcb_input_get_device_modifier_mapping_reply_t;
π Reply function
xcb_input_get_device_modifier_mapping_reply_t
*xcb_input_get_device_modifier_mapping_reply(xcb_connection_t *conn,
xcb_input_get_device_modifier_mapping_cookie_t cookie,
xcb_generic_error_t **e);
β Reply accessors
these are the little helpers that go digging through the reply for you, iconic behaviour honestly:
uint8_t *xcb_input_get_device_modifier_mapping_keymaps(const
xcb_input_get_device_modifier_mapping_request_t *reply);
int xcb_input_get_device_modifier_mapping_keymaps_length(const
xcb_input_get_device_modifier_mapping_reply_t *reply);
xcb_generic_iterator_t
xcb_input_get_device_modifier_mapping_keymaps_end(const
xcb_input_get_device_modifier_mapping_reply_t *reply);
heads up bestie: thekeymapsone takes axcb_input_get_device_modifier_mapping_request_t *while the other two take..._reply_t *. that's exactly what the page says, so we copy it EXACTLY and we do not "fix" it, periodt π
β¨ REQUEST ARGUMENTS β¨
connβ the XCB connection to X11. your lil hotline to the server, she's the main character πdevice_idβ TODO: NOT YET DOCUMENTED. yeah babe, the docs said "idk yet" and walked away π we keep it real, we don't invent lore.
β¨ REPLY FIELDS β¨
response_typeβ the type of this reply, and in this case it'sXCB_INPUT_GET_DEVICE_MODIFIER_MAPPING. this field also lives in thexcb_generic_reply_tand you can use it to tell replies apart from each other, like a little name tag at a party πsequenceβ the sequence number of the last request processed by the X11 server. very "who's next in line" energy β¨lengthβ the length of the reply, in words (a word is 4 bytes). yes bestie, a word. 4 bytes. write it down πxi_reply_typeβ TODO: NOT YET DOCUMENTED. once again, the docs are mysterious and we respect the mystery πkeycodes_per_modifierβ TODO: NOT YET DOCUMENTED. the trilogy of "we'll tell you later" fr fr.
β¨ DESCRIPTION β¨
soβ¦ the description section is empty. nothing. a void. she simply did not show up π we're not gonna make stuff up about her, that's not the vibe.
β¨ RETURN VALUE β¨
Returns an xcb_input_get_device_modifier_mapping_cookie_t πͺ β yes, a cookie, and no you can't eat it.
Errors have to be handled when you call the reply function xcb_input_get_device_modifier_mapping_reply.
If you'd rather handle errors in the event loop instead, use xcb_input_get_device_modifier_mapping_unchecked. See xcb-requests(3) for details, bestie, it's all in there π
β¨ ERRORS β¨
This request does never generate any errors. not one. zero. she is unbothered, moisturized, in her lane πΈ
β¨ SEE ALSO β¨
β¦nothing listed. the see-also section is a blank canvas and we love that for her π¦
β¨ AUTHOR β¨
Generated from xinput.xml. Contact xcb@lists.freedesktop.org for corrections and improvements β so if something's off, that's the address to slide into, not mine π
okay that's the whole page bestie, go forth and map those modifiers, you ate π β¨
X Version 11 π libxcb 1.17.0 β that's the source/version tea, and it's the same tag riding along at the bottom of the page as xcb_input_get...difier_mapping(3). love that for us. mwah π«Άπ
π¦ 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