XkbChangeIndicators(3)
β¨ XkbChangeIndicators(3) β XKB FUNCTIONS β¨
okay bestie, sit down, hydrate, and let me tell you about XkbChangeIndicators π
it's a libX11 thing from the XKB crew and it's literally the low-traffic way to poke at your keyboard indicators.
πΈ NAME πΈ
XkbChangeIndicators β changes indicator maps or state without passing the entire keyboard description π¦
π SYNOPSIS π
Bool XkbChangeIndicators (Display *dpy, XkbDescPtr xkb,
XkbIndicatorChangesPtr changes, unsigned int state);
π ARGUMENTS π
dpyβ your connection to the X server, the group chat line to the server basically πxkbβ the keyboard description from which names are to be taken.changesβ the indicators to be updated on the server β¨stateβ the new state of indicators listed inchanges->state_changes
π DESCRIPTION π
The XkbIndicatorChangesRec identifies small modifications to the indicator map. Use it with the function XkbChangeIndicators to reduce the amount of traffic sent to the server (peep STRUCTURES below, iykyk) π«Ά
The state_changes field is a mask that specifies the indicators that have changed state, and map_changes is a mask that specifies the indicators whose maps have changed. Two little masks, doing the most π
XkbChangeIndicators copies any maps specified by changes from the keyboard description, xkb, to the server specified by dpy. If any bits are set in the state_changes field of changes, XkbChangeIndicators also sets the state of those indicators to the values specified in the state mask. A 1 bit in state turns the corresponding indicator on, a 0 bit turns it off. binary slay π₯
In addition, it can also generate XkbIndicatorStateNotify and XkbIndicatorMapNotify events. not me casually spawning events π
Whenever an indicator changes state, the server sends XkbIndicatorStateNotify events to all interested clients. Similarly, whenever an indicator's map changes, the server sends XkbIndicatorMapNotify events to all interested clients. it's giving broadcast energy π£
To receive XkbIndicatorStateNotify events, use XkbSelectEvents with both the bits_to_change and values_for_bits parameters containing XkbIndicatorStateNotifyMask. To receive XkbIndicatorMapNotify events, use XkbSelectEvents with XkbIndicatorMapNotifyMask.
To receive events for only specific indicators, use XkbSelectEventDetails. Set the event_type parameter to XkbIndicatorStateNotify or XkbIndicatorMapNotify, and set both the bits_to_change and values_for_bits detail parameters to a mask where each bit specifies one indicator, turning on those bits that specify the indicators for which you want to receive events. picky about your notifications? valid, we love a curated feed π
xkb_type is either XkbIndicatorStateNotify or XkbIndicatorMapNotify, depending on whether the event is a kbIndicatorStateNotify event or kbIndicatorMapNotify event.
The changed parameter is a mask that is the bitwise inclusive OR of the indicators that have changed. If the event is of type XkbIndicatorMapNotify, changed reports the maps that changed. If the event is of type XkbIndicatorStateNotify, changed reports the indicators that have changed state. state is a mask that specifies the current state of all indicators, whether they have changed or not, for both XkbIndicatorStateNotify and IndicatorMapNotify events. yes ma'am, all of them, changed or not π«‘
π§ STRUCTURES π§
typedef struct _XkbIndicatorChanges {
unsigned int state_changes;
unsigned int map_changes;
}XkbIndicatorChangesRec,*XkbIndicatorChangesPtr;
Both types of indicator events use the same structure:
typedef struct _XkbIndicatorNotify {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* True => synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* specifies state or map notify */
int device; /* Xkb device ID, will not be XkbUseCoreKbd*/
unsigned int changed; /* mask of indicators with new state or map */
unsigned int state; /* current state of all indicators */
} XkbIndicatorNotifyEvent;
π DIAGNOSTICS π
BadAtomβ A name is neither a validAtomorNoneπBadImplementationβ Invalid reply from server π the server is being weird bestie, not your fault
π SEE ALSO π
XkbIndicatorMapNotify(3)XkbIndicatorStateNotify(3)
X Version 11 β¨ libX11 1.8.4 β¨ and that's the whole page, periodt π go forth and change those indicators, bestie, you're the main character of this X server ππ¦ππ
π¦ where this page comes from
- debian bookworm: libx11-doc 2:1.8.4-2+deb12u2
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms