1XkbSetAccessXTimeout(3) XKB FUNCTIONS XkbSetAccessXTimeout(3)
2
3
4
6 XkbSetAccessXTimeout - Configures the AccessXTimeout options for a key‐
7 board device
8
10 Bool XkbSetAccessXTimeout (Display *display, unsigned int device_spec,
11 unsigned short timeout, unsigned int ctrls_mask, unsigned int
12 ctrls_values, unsigned short opts_mask, unsigned short opts_val‐
13 ues);
14
16 - display
17 connection to X server
18
19 - device_spec
20 device to configure, or XkbUseCoreKbd
21
22 - timeout
23 seconds idle until AccessXTimeout occurs
24
25 - ctrls_mask
26 boolean controls to modify
27
28 - ctrls_values
29 new bits for controls selected by ctrls_mask
30
31 - opts_mask
32 ax_options to change
33
34 - opts_values
35 new bits for ax_options selected by opts_mask
36
38 In environments where computers are shared, features such as SlowKeys
39 present a problem: if SlowKeys is on, the keyboard can appear to be un‐
40 responsive because keys are not accepted until they are held for a cer‐
41 tain period of time. To help solve this problem, Xkb provides an Ac‐
42 cessXTimeout control to automatically change the enabled/disabled state
43 of any boolean controls and to change the value of the AccessXKeys and
44 AccessXFeedback control attributes if the keyboard is idle for a speci‐
45 fied period of time.
46
47 When a timeout as specified by AccessXTimeout occurs and a control is
48 consequently modified, Xkb generates an XkbControlsNotify event. For
49 more information on XkbControlsNotify events.
50
51 timeout specifies the number of seconds the keyboard must be idle be‐
52 fore the controls are modified. ctrls_mask specifies what controls are
53 to be enabled or disabled, and ctrls_values specifies whether those
54 controls are to be enabled or disabled. The bit values correspond to
55 those for enabling and disabling boolean controls using XkbChangeEn‐
56 abledControls.
57 The opts_mask field specifies which attributes of the AccessXKeys and
58 AccessXFeedback controls are to be changed, and opts_values specifies
59 the new values for those options. The bit values correspond to those
60 for the ax_options field of an XkbDescRec.
61
62 XkbSetAccessXTimeout sends a request to configure the AccessXTimeout
63 control to the server. It does not wait for a reply, and normally re‐
64 turns True. If a compatible version of the Xkb extension is not avail‐
65 able in the server, XkbSetAccessXTimeout returns False.
66
68 True The XkbSetAccessXTimeout function returns True when a
69 compatible version of the Xkb extension is available in
70 the server.
71
72 False The XkbSetAccessXTimeout function returns False when a
73 compatible version of the Xkb extension is not available
74 in the server.
75
77 The complete description of an Xkb keyboard is given by an XkbDescRec.
78 The component structures in the XkbDescRec represent the major Xkb com‐
79 ponents.
80
81 typedef struct {
82 struct _XDisplay * display; /* connection to X server */
83 unsigned short flags; /* private to Xkb, do not modify */
84 unsigned short device_spec; /* device of interest */
85 KeyCode min_key_code; /* minimum keycode for device */
86 KeyCode max_key_code; /* maximum keycode for device */
87 XkbControlsPtr ctrls; /* controls */
88 XkbServerMapPtr server; /* server keymap */
89 XkbClientMapPtr map; /* client keymap */
90 XkbIndicatorPtr indicators; /* indicator map */
91 XkbNamesPtr names; /* names for all components */
92 XkbCompatMapPtr compat; /* compatibility map */
93 XkbGeometryPtr geom; /* physical geometry of keyboard */
94 } XkbDescRec, *XkbDescPtr;
95
96 The display field points to an X display structure. The flags field is
97 private to the library: modifying flags may yield unpredictable re‐
98 sults. The device_spec field specifies the device identifier of the
99 keyboard input device, or XkbUseCoreKeyboard, which specifies the core
100 keyboard device. The min_key_code and max_key_code fields specify the
101 least and greatest keycode that can be returned by the keyboard.
102
103 Each structure component has a corresponding mask bit that is used in
104 function calls to indicate that the structure should be manipulated in
105 some manner, such as allocating it or freeing it. These masks and their
106 relationships to the fields in the XkbDescRec are shown in Table 1.
107
108
109 Table 1 Mask Bits for XkbDescRec
110 ──────────────────────────────────────────────────
111 Mask Bit XkbDescRec Field Value
112 ──────────────────────────────────────────────────
113 XkbControlsMask ctrls (1L<<0)
114 XkbServerMapMask server (1L<<1)
115 XkbIClientMapMask map (1L<<2)
116 XkbIndicatorMapMask indicators (1L<<3)
117 XkbNamesMask names (1L<<4)
118 XkbCompatMapMask compat (1L<<5)
119 XkbGeometryMask geom (1L<<6)
120 XkbAllComponentsMask All Fields (0x7f)
121
122 The structure for the XkbControlsNotify event is defined as follows:
123
124 typedef struct {
125 int type; /* Xkb extension base event code */
126 unsigned long serial; /* X server serial number for event */
127 Bool send_event; /* True => synthetically generated */
128 Display * display; /* server connection where event generated */
129 Time time; /* server time when event generated */
130 int xkb_type; /* XkbCompatMapNotify */
131 int device; /* Xkb device ID, will not be XkbUseCoreKbd */
132 unsigned int changed_ctrls; /* bits indicating which controls data have changed*/
133 unsigned int enabled_ctrls; /* controls currently enabled in server */
134 unsigned int enabled_ctrl_changes; /* bits indicating enabled/disabled controls */
135 int num_groups; /* current number of keyboard groups */
136 KeyCode keycode; /* != 0 => keycode of key causing change */
137 char event_type; /* Type of event causing change */
138 char req_major; /* major event code of event causing change */
139 char req_minor; /* minor event code of event causing change */
140 } XkbControlsNotifyEvent;
141
142
144 XkbChangeEnabledControls(3)
145
146
147
148X Version 11 libX11 1.8.1 XkbSetAccessXTimeout(3)