2 .\" Copyright 1999 Oracle and/or its affiliates. All rights reserved.
4 .\" Permission is hereby granted, free of charge, to any person obtaining a
5 .\" copy of this software and associated documentation files (the "Software"),
6 .\" to deal in the Software without restriction, including without limitation
7 .\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 .\" and/or sell copies of the Software, and to permit persons to whom the
9 .\" Software is furnished to do so, subject to the following conditions:
11 .\" The above copyright notice and this permission notice (including the next
12 .\" paragraph) shall be included in all copies or substantial portions of the
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 .\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 .\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 .\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 .\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 .\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 .\" DEALINGS IN THE SOFTWARE.
23 .TH XkbSelectEvents __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
25 XkbSelectEvents \- Selects and / or deselects for delivery of one or more Xkb
26 events and has them delivered under all conditions
29 .B Bool XkbSelectEvents
30 .BI "(\^Display *" "display" "\^,"
31 .BI "unsigned int " "device_spec" "\^,"
32 .BI "unsigned long int " "bits_to_change" "\^,"
33 .BI "unsigned long int " "values_for_bits" "\^);"
39 connection to the X server
42 device ID, or XkbUseCoreKbd
45 determines events to be selected / deselected
48 1=>select, 0->deselect; for events in bits_to_change
51 Xkb events are selected using an event mask, much the same as normal core X
52 events are selected. However, unlike selecting core X events, where you must
53 specify the selection status (on or off) for all possible event types whenever
54 you wish to change the selection criteria for any one event, Xkb allows you to
55 restrict the specification to only the event types you wish to change. This
56 means that you do not need to remember the event selection values for all
57 possible types each time you want to change one of them.
59 Many Xkb event types are generated under several different circumstances. When
60 selecting to receive an Xkb event, you may specify either that you want it
61 delivered under all circumstances, or that you want it delivered only for a
62 subset of the possible circumstances.
64 You can also deselect an event type that was previously selected for, using the
67 Xkb provides two functions to select and deselect delivery of Xkb events.
69 allows you to select or deselect delivery of more than one Xkb
70 event type at once. Events selected using
72 are delivered to your program under all circumstances that generate the events.
73 To restrict delivery of an event to a subset of the conditions under which it
75 .I XkbSelectEventDetails. XkbSelectEventDetails
76 only allows you to change the selection conditions for a single event at a time,
77 but it provides a means of fine-tuning the conditions under which the event is
80 This request changes the Xkb event selection mask for the keyboard specified by
83 Each Xkb event that can be selected is represented by a bit in the
87 masks. Only the event selection bits specified by the
89 parameter are affected; any unspecified bits are left unchanged. To turn on
90 event selection for an event, set the bit for the event in the
92 parameter and set the corresponding bit in the
94 parameter. To turn off event selection for an event, set the bit for the event
97 parameter and do not set the corresponding bit in the
99 parameter. The valid values for both of these parameters are an inclusive
100 bitwise OR of the masks shown in Table 1. There is no interface to return your
101 client's current event selection mask. Clients cannot set other clients' event
104 The X server reports the events defined by Xkb to your client application only
105 if you have requested them via a call to
108 .I XkbSelectEventDetails.
109 Specify the event types in which you are interested in a mask.
111 Table 1 lists the event mask constants that can be specified with the
113 request and the circumstances in which the mask should be specified.
119 Table 1 XkbSelectEvents Mask Constants
121 Event Mask Value Notification Wanted
123 XkbNewKeyboardNotifyMask (1L<<0) Keyboard geometry change
124 XkbMapNotifyMask (1L<<1) Keyboard mapping change
125 XkbStateNotifyMask (1L<<2) Keyboard state change
126 XkbControlsNotifyMask (1L<<3) Keyboard control change
127 XkbIndicatorStateNotifyMask (1L<<4) Keyboard indicator state change
128 XkbIndicatorMapNotifyMask (1L<<5) Keyboard indicator map change
129 XkbNamesNotifyMask (1L<<6) Keyboard name change
130 XkbCompatMapNotifyMask (1L<<7) Keyboard compat map change
131 XkbBellNotifyMask (1L<<8) Bell
132 XkbActionMessageMask (1L<<9) Action message
133 XkbAccessXNotifyMask (1L<<10) AccessX features
134 XkbExtensionDeviceNotifyMask (1L<<11) Extension device
135 XkbAllEventsMask (0xFFF) All Xkb events
138 If a bit is not set in the
140 parameter, but the corresponding bit is set in the
142 parameter, a BadMatch protocol error results. If an undefined bit is set in
147 parameter, a BadValue protocol error results.
149 All event selection bits are initially zero for clients using the Xkb extension.
150 Once you set some bits, they remain set for your client until you clear them via
155 returns False if the Xkb extension has not been initilialized and True
162 function returns True if the Xkb extension has been initilialized.
167 function returns False if the Xkb extension has not been initilialized.
169 .BR XkbSelectEventDetails (__libmansuffix__),
170 .BR XkbUseCoreKbd (__libmansuffix__)