XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING_REPLY(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_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: the keymaps one takes a xcb_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's XCB_INPUT_GET_DEVICE_MODIFIER_MAPPING. this field also lives in the xcb_generic_reply_t and 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 πŸ«ΆπŸŽ€