XkbSelectEventDetails(3)
π
XkbSelectEventDetails π
β from the XKB FUNCTIONS manual, bestie
π NAME π
XkbSelectEventDetails β selects or deselects for a specific Xkb event, and optionally places conditions on when events of that type are reported to your client. Itβs giving selective-delivery realness, no cap. β¨
πΈ SYNOPSIS πΈ
Bool XkbSelectEventDetails (Display *display, unsigned int device_spec,
unsigned int event_type, unsigned long int bits_to_change,
unsigned long int values_for_bits);
π ARGUMENTS π
displayβ your connection to the X server, the whole link-up. πdevice_specβ the device ID, orXkbUseCoreKbd. πevent_typeβ the Xkb event type youβre interested in. πbits_to_changeβ determines events to be selected / deselected. ποΈvalues_for_bitsβ1=>select, 0->deselect; for events inbits_to_change. β β
π¦ DESCRIPTION π¦
Okay so Xkb events are selected using an event mask, much the same as normal core X events are selected. But hereβs the plot twist: with core X events you must specify the selection status (on or off) for all possible event types whenever you wish to change the selection criteria for any one event. Xkb does not make you do all that. It lets you restrict the specification to only the event types you wish to change. So you do not need to remember the event selection values for all possible types each time you want to change one of them. Slay for working memory. π§ β¨
Many Xkb event types are generated under several different circumstances. When selecting to receive an Xkb event, you may specify either that you want it delivered under all circumstances, or that you want it delivered only for a subset of the possible circumstances. You can also deselect an event type that was previously selected for, using the same granularity. Periodt. π
Xkb provides two functions to select and deselect delivery of Xkb events. XkbSelectEvents allows you to select or deselect delivery of more than one Xkb event type at once. Events selected using XkbSelectEvents are delivered to your program under all circumstances that generate the events. To restrict delivery of an event to a subset of the conditions under which it occurs, use XkbSelectEventDetails. XkbSelectEventDetails only allows you to change the selection conditions for a single event at a time, but it provides a means of fine-tuning the conditions under which the event is delivered. Itβs literally the detail-oriented bestie of the two. π
To select or deselect for a specific Xkb event and optionally place conditions on when events of that type are reported to your client, use XkbSelectEventDetails. This allows you to exercise a finer granularity of control over delivery of Xkb events with XkbSelectEvents. While XkbSelectEvents allows multiple events to be selected, XkbSelectEventDetails changes the selection criteria for a single type of Xkb event. The interpretation of the bits_to_change and values_for_bits masks depends on the event type in question. iykyk. π¦
XkbSelectEventDetails changes the Xkb event selection mask for the keyboard specified by device_spec and the Xkb event specified by event_type. To turn on event selection for an event detail, set the bit for the detail in the bits_to_change parameter and set the corresponding bit in the values_for_bits parameter. To turn off event detail selection for a detail, set the bit for the detail in the bits_to_change parameter and do not set the corresponding bit in the values_for_bits parameter. Thatβs the whole bit dance, bestie. πΊ
Heads up: if an invalid event type is specified, aBadValueprotocol error results. If a bit is not set in thebits_to_changeparameter, but the corresponding bit is set in thevalues_for_bitsparameter, aBadMatchprotocol error results. If an undefined bit is set in either thebits_to_changeor thevalues_for_bitsparameter, aBadValueprotocol error results. Not me warning you twice. π
For each type of Xkb event, the legal event details that you can specify in the XkbSelectEventDetails request are listed in the chapters that describe each event in detail. Go read those chapters, bestie. π
π¨ DIAGNOSTICS π¨
BadMatchβ a compatible version of Xkb was not available in the server, or an argument has correct type and range, but is otherwise invalid. πBadValueβ an argument is out of range. π¨
π SEE ALSO π
XkbSelectEvents(3)XkbUseCoreKbd(3)
okay thatβs the page, mwah π β source/version: X Version 11, libX11 1.8.14; the footer didnβt give a date, so no made-up date here, periodt π«Ά
π¦ 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