1XkbSelectEvents(3) XKB FUNCTIONS XkbSelectEvents(3)
2
3
4
6 XkbSelectEvents - Selects and / or deselects for delivery of one or
7 more Xkb events and has them delivered under all conditions
8
10 Bool XkbSelectEvents (Display *display, unsigned int device_spec,
11 unsigned long int bits_to_change, unsigned long int val‐
12 ues_for_bits);
13
15 display
16 connection to the X server
17
18 device_spec
19 device ID, or XkbUseCoreKbd
20
21 bits_to_change
22 determines events to be selected / deselected
23
24 values_for_bits
25 1=>select, 0->deselect; for events in bits_to_change
26
28 Xkb events are selected using an event mask, much the same as normal
29 core X events are selected. However, unlike selecting core X events,
30 where you must specify the selection status (on or off) for all possi‐
31 ble event types whenever you wish to change the selection criteria for
32 any one event, Xkb allows you to restrict the specification to only the
33 event types you wish to change. This means that you do not need to
34 remember the event selection values for all possible types each time
35 you want to change one of them.
36
37 Many Xkb event types are generated under several different circum‐
38 stances. When selecting to receive an Xkb event, you may specify either
39 that you want it delivered under all circumstances, or that you want it
40 delivered only for a subset of the possible circumstances.
41
42 You can also deselect an event type that was previously selected for,
43 using the same granularity.
44
45 Xkb provides two functions to select and deselect delivery of Xkb
46 events. XkbSelectEvents allows you to select or deselect delivery of
47 more than one Xkb event type at once. Events selected using XkbSe‐
48 lectEvents are delivered to your program under all circumstances that
49 generate the events. To restrict delivery of an event to a subset of
50 the conditions under which it occurs, use XkbSelectEventDetails. XkbSe‐
51 lectEventDetails only allows you to change the selection conditions for
52 a single event at a time, but it provides a means of fine-tuning the
53 conditions under which the event is delivered.
54
55 This request changes the Xkb event selection mask for the keyboard
56 specified by device_spec.
57
58 Each Xkb event that can be selected is represented by a bit in the
59 bits_to_change and values_for_bits masks. Only the event selection bits
60 specified by the bits_to_change parameter are affected; any unspecified
61 bits are left unchanged. To turn on event selection for an event, set
62 the bit for the event in the bits_to_change parameter and set the cor‐
63 responding bit in the values_for_bits parameter. To turn off event
64 selection for an event, set the bit for the event in the bits_to_change
65 parameter and do not set the corresponding bit in the values_for_bits
66 parameter. The valid values for both of these parameters are an inclu‐
67 sive bitwise OR of the masks shown in Table 1. There is no interface to
68 return your client's current event selection mask. Clients cannot set
69 other clients' event selection masks.
70
71 The X server reports the events defined by Xkb to your client applica‐
72 tion only if you have requested them via a call to XkbSelectEvents or
73 XkbSelectEventDetails. Specify the event types in which you are inter‐
74 ested in a mask.
75
76 Table 1 lists the event mask constants that can be specified with the
77 XkbSelectEvents request and the circumstances in which the mask should
78 be specified.
79
80
81 Table 1 XkbSelectEvents Mask Constants
82 ───────────────────────────────────────────────────────────────────────────
83 Event Mask Value Notification Wanted
84 ───────────────────────────────────────────────────────────────────────────
85 XkbNewKeyboardNotifyMask (1L<<0) Keyboard geometry change
86 XkbMapNotifyMask (1L<<1) Keyboard mapping change
87 XkbStateNotifyMask (1L<<2) Keyboard state change
88 XkbControlsNotifyMask (1L<<3) Keyboard control change
89 XkbIndicatorStateNotifyMask (1L<<4) Keyboard indicator state change
90 XkbIndicatorMapNotifyMask (1L<<5) Keyboard indicator map change
91 XkbNamesNotifyMask (1L<<6) Keyboard name change
92 XkbCompatMapNotifyMask (1L<<7) Keyboard compat map change
93 XkbBellNotifyMask (1L<<8) Bell
94 XkbActionMessageMask (1L<<9) Action message
95 XkbAccessXNotifyMask (1L<<10) AccessX features
96 XkbExtensionDeviceNotifyMask (1L<<11) Extension device
97 XkbAllEventsMask (0xFFF) All Xkb events
98
99 If a bit is not set in the bits_to_change parameter, but the corre‐
100 sponding bit is set in the values_for_bits parameter, a BadMatch proto‐
101 col error results. If an undefined bit is set in either the
102 bits_to_change or the values_for_bits parameter, a BadValue protocol
103 error results.
104
105 All event selection bits are initially zero for clients using the Xkb
106 extension. Once you set some bits, they remain set for your client
107 until you clear them via another call to XkbSelectEvents.
108
109 XkbSelectEvents returns False if the Xkb extension has not been initil‐
110 ialized and True otherwise.
111
113 True The XkbSelectEvents function returns True if the Xkb
114 extension has been initilialized.
115
116 False The XkbSelectEvents function returns False if the Xkb
117 extension has not been initilialized.
118
120 XkbSelectEventDetails(3), XkbUseCoreKbd(3)
121
122
123
124X Version 11 libX11 1.6.4 XkbSelectEvents(3)