XkbNoteDeviceChanges(3)
π XkbNoteDeviceChanges β from the XKB FUNCTIONS girlies
okay so bestie, this one's a libX11 / XKB functions page, and it's actually so much simpler than it looks, i promise π«Ά
β¨ NAME β¨
XkbNoteDeviceChanges β literally just: note the device changes that showed up in an XkbExtensionDeviceNotify event. that's the whole vibe π
πΈ SYNOPSIS πΈ
void XkbNoteDeviceChanges (XkbDeviceChangesPtr old,
XkbExtensionDeviceNotifyEvent *new, unsigned int wanted);
π ARGUMENTS π
oldβ the structure that's tracking state changes, aka the lil notebook where we write stuff down πnewβ the event that's telling us about state changes πwantedβ a mask saying which changes we actually wanna note down π
π¦ DESCRIPTION π¦
okay so the wanted field is where you say what should get noted in old, and you build it by bitwise inclusive OR-ing together one or more of the masks from Table 1. meanwhile, the reason field of the event in new is what's telling you the types of changes this event is reporting. no cap.
so XkbNoteDeviceChanges updates the XkbDeviceChangesRec that old points at, with the changes that are both specified in wanted and contained in new->reason. intersection core π§
β Table 1 β XkbDeviceInfoRec Mask Bits β
XkbXI_KeyboardsMaskβXkbDeviceInfoRecfields effected: (none listed); value(1L <<0); capability if set: Clients can use all Xkb requests and events with KeyClass devices supported by the input device extension.XkbXI_ButtonActionsMaskβ fields effectednum_btns,btn_acts; value(1L <<1); capability if set: Clients can assign key actions to buttons non-KeyClass input extension devices.XkbXI_IndicatorNamesMaskβ fields effectedleds->names; value(1L <<2); capability if set: Clients can assign names to indicators on non-KeyClass input extension devices.XkbXI_IndicatorMapsMaskβ fields effectedleds->maps; value(1L <<3); capability if set: Clients can assign indicator maps to indicators on non-KeyClass input extension devices.XkbXI_IndicatorStateMaskβ fields effectedleds->state; value(1L <<4); capability if set: Clients can request the status of indicators on non-KeyClass input extension devices.XkbXI_IndicatorsMaskβ fields effectedsz_leds,num_leds,leds->*; value(0x1c); capability if set:XkbXI_IndicatorNamesMask | XkbXI_IndicatorMapsMask | XkbXI_IndicatorStateMaskXkbXI_UnsupportedFeaturesMaskβ fields effectedunsupported; value(1L <<15); (no capability text given)XkbXI_AllDeviceFeaturesMaskβ fields effected: Those selected by Value Column masks; value(0x1e); capability if set:XkbXI_IndicatorsMask | XkbSI_ButtonActionsMaskXkbXI_AllFeaturesMaskβ fields effected: Those selected by Value Column masks; value(0x1f); capability if set:XkbSI_AllDeviceFeaturesMask | XkbSI_KeyboardsMaskXkbXI_AllDetailsMaskβ fields effected: Those selected by Value column masks; value(0x801f); capability if set:XkbXI_AllFeaturesMask | XkbXI_UnsupportedFeaturesMask
π«Ά and when you wanna update a local copy of the state and configuration of an X input extension device with the changes you previously noted in anXkbDeviceChangesRecstructure β that'sXkbGetDeviceInfoChanges. different function, different moment, k?
π STRUCTURES π
so the way you track changes to an Xkb extension device is by listening to XkbDeviceExtensionNotify events and accumulating the changes in an XkbDeviceChangesRec structure. then, the changes you noted in the structure get used in later operations to update either a server configuration or a local copy of an Xkb extension device configuration. both valid, bestie β¨
the changes structure is defined exactly like this:
typedef struct _XkbDeviceChanges {
unsigned int changed; /* bits indicating what has changed */
unsigned short first_btn; /* number of first button which changed, if any */
unsigned short num_btns; /* number of buttons that have changed */
XkbDeviceLedChangesRec leds;
} XkbDeviceChangesRec,*XkbDeviceChangesPtr;
π SEE ALSO π
and that's the whole page, bestie, you ate it π β¨π
π sign-off tingz: this masterpiece comes from X Version 11, libX11 1.8.14 β go stan the maintainers fr fr π
</div>
π¦ 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