xcb_input_grab_device_key(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_grab_device_key πŸ’…

okay so bestie, welcome to the xcb_input_grab_device_key page β€” it lives in the XCB Requests manual section, and honestly? it's giving "grab a key on a device, but make it ✨fancy✨". let's get into it πŸŽ€


🌸 NAME 🌸

xcb_input_grab_device_key β€” (the description slot is literally blank in the original, no cap, so we move on 🫢)


✨ SYNOPSIS ✨

first things first, you gotta pull in the header:

#include <xcb/xinput.h>

πŸ¦‹ Request function

xcb_void_cookie_t xcb_input_grab_device_key(xcb_connection_t *conn,
       xcb_window_t grab_window, uint16_t num_classes,
       uint16_t modifiers, uint8_t modifier_device,
       uint8_t grabbed_device, uint8_t key, uint8_t this_device_mode,
       uint8_t other_device_mode, uint8_t owner_events, const
       xcb_input_event_class_t *classes);

that's the whole signature, verbatim, don't touch a single character of it πŸ”₯


πŸ‘‘ REQUEST ARGUMENTS πŸ‘‘

here's the lineup, one by one:

  • conn β€” the XCB connection to X11. your lil phone line to the server πŸ“ž
  • grab_window β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • num_classes β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • modifiers β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • modifier_device β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • grabbed_device β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • key β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • this_device_mode β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • other_device_mode β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • owner_events β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ
  • classes β€” TODO: NOT YET DOCUMENTED. πŸ™ˆ

like… the docs really said "no thoughts, head empty" for every single one of these πŸ’€ but that's the list, all of them, present and accounted for.


πŸ’– DESCRIPTION πŸ’–

so the original page has this section and it's… empty. nothing. void. main character energy with zero lines πŸ«₯ we're keeping it exactly as empty as it was, bestie.


πŸŽ€ RETURN VALUE πŸŽ€

you get back an xcb_void_cookie_t. and here's the tea: any errors have to be handled over in the event loop, okay? don't come looking for them in the return value βœ‹

if you'd rather handle errors directly with xcb_request_check instead, then use xcb_input_grab_device_key_checked β€” that's your girl. peek at xcb-requests(3) for the details ✨


🌈 ERRORS 🌈

this request does never generate any errors. periodt. zero. none. iconic behaviour honestly πŸ‘‘

πŸ’œ SEE ALSO πŸ’œ

(blank in the original β€” nothing referenced here, so nothing to link, we simply vibe 🌸)


🧚 AUTHOR 🧚

generated from xinput.xml. contact xcb@lists.freedesktop.org for corrections and improvements πŸ“¬


and that's the whole page, bestie!! this one came to you straight out of the X Version 11 crew, libxcb 1.17.0 era, and yeah, xcb_input_grab_device_key(3) is the manual page we just devoured together. go grab some keys, stay hydrated, ily πŸ«ΆπŸ’–