1XkbNoteControlsChanges(3) XKB FUNCTIONS XkbNoteControlsChanges(3)
2
3
4
6 XkbNoteControlsChanges - Notes the changes in a changes structure when
7 a client receives an XkbControlsNotify event
8
10 void XkbNoteControlsChanges (XkbControlsChangesPtr changes, XkbControl‐
11 sNotifyEvent *new, unsigned int wanted);
12
14 changes
15 records changes indicated by new
16
17 new tells which things have changed
18
19 wanted tells which parts of new to record in changes
20
22 Whenever a field in the controls structure changes in the server's key‐
23 board description, the server sends an XkbControlsNotify event to all
24 interested clients.To receive XkbControlsNotify events under all possi‐
25 ble conditions, use XkbSelectEvents and pass XkbControlsNotifyMask in
26 both bits_to_change and values_for_bits.
27
28 To receive XkbControlsNotify events only under certain conditions, use
29 XkbSelectEventDetails using XkbControlsNotify as the event_type and
30 specifying the desired state changes in bits_to_change and val‐
31 ues_for_bits using mask bits from Table 1.
32
33 Table 1 shows the actual values for the individual mask bits used to
34 select controls for modification and to enable and disable the control.
35 Note that the same mask bit is used to specify general modifications to
36 the parameters used to configure the control (which), and to enable and
37 disable the control (enabled_ctrls). The anomalies in the table (no
38 "ok" in column) are for controls that have no configurable attributes;
39 and for controls that are not boolean controls and therefore cannot be
40 enabled or disabled.
41
42
43 Table 1 Controls Mask Bits
44 ──────────────────────────────────────────────────────────────────────────
45 Mask Bit which or enabled Value
46 changed_ctrls _ctrls
47 ──────────────────────────────────────────────────────────────────────────
48 XkbRepeatKeysMask ok ok (1L<<0)
49 XkbSlowKeysMask ok ok (1L<<1)
50 XkbBounceKeysMask ok ok (1L<<2)
51 XkbStickyKeysMask ok ok (1L<<3)
52 XkbMouseKeysMask ok ok (1L<<4)
53 XkbMouseKeysAccelMask ok ok (1L<<5)
54 XkbAccessXKeysMask ok ok (1L<<6)
55 XkbAccessXTimeoutMask ok ok (1L<<7)
56 XkbAccessXFeedbackMask ok ok (1L<<8)
57 XkbAudibleBellMask ok (1L<<9)
58 XkbOverlay1Mask ok (1L<<10)
59 XkbOverlay2Mask ok (1L<<11)
60 XkbIgnoreGroupLockMask ok (1L<<12)
61 XkbGroupsWrapMask ok (1L<<27)
62 XkbInternalModsMask ok (1L<<28)
63 XkbIgnoreLockModsMask ok (1L<<29)
64 XkbPerKeyRepeatMask ok (1L<<30)
65 XkbControlsEnabledMask ok (1L<<31)
66
67 XkbAccessXOptionsMask ok ok (XkbStickyKeysMask |
68 XkbAccessXFeedbackMask)
69 XkbAllBooleanCtrlsMask ok (0x00001FFF)
70 XkbAllControlsMask ok (0xF8001FFF)
71
72 The changed_ctrls field specifies the controls components that have
73 changed and consists of bits taken from the masks defined in Table 1
74 with "ok" in the changed_ctrls column.
75
76 The controls currently enabled in the server are reported in the en‐
77 abled_ctrls field. If any controls were just enabled or disabled (that
78 is, the contents of the enabled_ctrls field changed), they are flagged
79 in the enabled_ctrl_changes field. The valid bits for these fields are
80 the masks listed in Table 1 with "ok" in the enabled_ctrls column. The
81 num_groups field reports the number of groups bound to the key belong‐
82 ing to the most number of groups and is automatically updated when the
83 keyboard mapping changes.
84
85 If the change was caused by a request from a client, the keycode and
86 event_type fields are set to zero and the req_major and req_minor
87 fields identify the request. The req_major value is the same as the ma‐
88 jor extension opcode. Otherwise, event_type is set to the type of event
89 that caused the change (one of KeyPress, KeyRelease, DeviceKeyPress,
90 DeviceKeyRelease, ButtonPress or ButtonRelease), and req_major and
91 req_minor are undefined. If event_type is KeyPress, KeyRelease, De‐
92 viceKeyPress, or DeviceKeyRelease, the keycode field is set to the key
93 that caused the change. If event_type is ButtonPress or ButtonRelease,
94 keycode contains the button number.
95
96 When a client receives an XkbControlsNotify event, it can note the
97 changes in a changes structure using XkbNoteControlsChanges.
98
99 The wanted parameter is a bitwise inclusive OR of bits taken from the
100 set of masks specified in Table 1 with "ok" in the changed_ctrls col‐
101 umn. XkbNoteControlsChanges copies any changes reported in new and
102 specified in wanted into the changes record specified by old.
103
105 The structure for the XkbControlsNotify event is defined as follows:
106
107 typedef struct {
108 int type; /* Xkb extension base event code */
109 unsigned long serial; /* X server serial number for event */
110 Bool send_event; /* True => synthetically generated */
111 Display * display; /* server connection where event generated */
112 Time time; /* server time when event generated */
113 int xkb_type; /* XkbCompatMapNotify */
114 int device; /* Xkb device ID, will not be XkbUseCoreKbd */
115 unsigned int changed_ctrls; /* bits indicating which controls data have changed*/
116 unsigned int enabled_ctrls; /* controls currently enabled in server */
117 unsigned int enabled_ctrl_changes; /* bits indicating enabled/disabled controls */
118 int num_groups; /* current number of keyboard groups */
119 KeyCode keycode; /* != 0 => keycode of key causing change */
120 char event_type; /* Type of event causing change */
121 char req_major; /* major event code of event causing change */
122 char req_minor; /* minor event code of event causing change */
123 } XkbControlsNotifyEvent;
124
126 XkbSelectEventDetails(3), XkbSelectEvents(3)
127
128
129
130X Version 11 libX11 1.8.7 XkbNoteControlsChanges(3)