XkbGetDeviceButtonActions(3)
XkbGetDeviceButtonActions(3) β XKB FUNCTIONS β¨
okay so bestie, this is the XKB FUNCTIONS page for XkbGetDeviceButtonActions, and itβs literally the βask the server about device button actionsβ girlie π
β¨ NAME β¨
XkbGetDeviceButtonActions β query the button actions associated with an X Input Extension device π
β¨ SYNOPSIS β¨
Status XkbGetDeviceButtonActions (Display *dpy, XkbDeviceInfoPtr
device_info, Bool all_buttons, unsigned int first_button,
unsigned int num_buttons);
β¨ ARGUMENTS β¨
dpyβ connection to X serverdevice_infoβ structure to update with resultsall_buttonsβTrue=> get information for all buttonsfirst_buttonβ number of first button for which info is desirednum_buttonsβ number of buttons for which info is desired
β¨ DESCRIPTION β¨
Okay so XkbGetDeviceButtonActions queries the server for the desired button information for the device indicated by the device_spec field of device_info, and then it waits for a reply π. If successful, XkbGetDeviceButtonActions backfills the button actions β thatβs the btn_acts field of device_info β for only the requested buttons. It also updates the name, type, supported, and unsupported fields, and returns Success. Slay.
all_buttons, first_button, and num_buttons specify the device buttons for which actions should be returned. Setting all_buttons to True requests actions for all device buttons; if all_buttons is False, first_button and num_buttons specify a range of buttons for which actions are requested. No cap.
Now the vibe checks that can fail: if a compatible version of Xkb is not available in the server, or the Xkb extension has not been properly initialized, XkbGetDeviceButtonActions returns BadAccess. If allocation errors occur, a BadAlloc status is returned. If the specified device (device_info->device_spec) is invalid, a BadKeyboard status is returned. If the device has no buttons, a BadMatch status is returned. If first_button and num_buttons specify illegal buttons, a BadValue status is returned. Periodt π
β¨ DIAGNOSTICS β¨
BadAccessβ The Xkb extension has not been properly initializedBadAllocβ Unable to allocate storageBadKeyboardβ The device specified was not a valid core or input extension deviceBadMatchβ A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise invalidBadValueβ An argument is out of range
Sign-off from X Version 11 and libX11 1.8.14 β the original footer isnβt giving a date, so Iβm not inventing one, bestie ππ«Ά
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms