Git init
[framework/uifw/xorg/lib/libx11.git] / man / xkb / XkbSetAccessXTimeout.man
1 '\" t
2 .\" Copyright 1999 Oracle and/or its affiliates. All rights reserved.
3 .\"
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:
10 .\"
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
13 .\" Software.
14 .\"
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.
22 .\"
23 .TH XkbSetAccessXTimeout __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
24 .SH NAME
25 XkbSetAccessXTimeout \- Configures the AccessXTimeout options for a keyboard 
26 device
27 .SH SYNOPSIS
28 .HP
29 .B Bool XkbSetAccessXTimeout
30 .BI "(\^Display *" "display" "\^,"
31 .BI "unsigned int " "device_spec" "\^,"
32 .BI "unsigned short " "timeout" "\^,"
33 .BI "unsigned int " "ctrls_mask" "\^,"
34 .BI "unsigned int " "ctrls_values" "\^,"
35 .BI "unsigned short " "opts_mask" "\^,"
36 .BI "unsigned short " "opts_values" "\^);"
37 .if n .ti +5n
38 .if t .ti +.5i
39 .SH ARGUMENTS
40 .TP
41 .I \- display
42 connection to X server
43 .TP
44 .I \- device_spec
45 device to configure, or XkbUseCoreKbd
46 .TP
47 .I \- timeout
48 seconds idle until AccessXTimeout occurs
49 .TP
50 .I \- ctrls_mask
51 boolean controls to modify 
52 .TP
53 .I \- ctrls_values
54 new bits for controls selected by ctrls_mask
55 .TP
56 .I \- opts_mask
57 ax_options to change
58 .TP
59 .I \- opts_values
60 new bits for ax_options selected by opts_mask
61 .SH DESCRIPTION
62 .LP
63 In environments where computers are shared, features such as SlowKeys present a 
64 problem: if SlowKeys is on, the keyboard can appear to be unresponsive because 
65 keys are not accepted until they are held for a certain period of time. To help 
66 solve this problem, Xkb provides an AccessXTimeout control to automatically 
67 change the enabled/disabled state of any boolean controls and to change the 
68 value of the AccessXKeys and AccessXFeedback control attributes if the keyboard 
69 is idle for a specified period of time.
70
71 When a timeout as specified by AccessXTimeout occurs and a control is 
72 consequently modified, Xkb generates an XkbControlsNotify event. For more 
73 information on XkbControlsNotify events.
74
75 .I timeout 
76 specifies the number of seconds the keyboard must be idle before the controls 
77 are modified. 
78 .I ctrls_mask 
79 specifies what controls are to be enabled or disabled, and 
80 .I ctrls_values 
81 specifies whether those controls are to be enabled or disabled. The bit values 
82 correspond to those for enabling and disabling boolean controls using 
83 .I XkbChangeEnabledControls.
84  The 
85 .I opts_mask 
86 field specifies which attributes of the AccessXKeys and AccessXFeedback controls 
87 are to be changed, and 
88 .I opts_values 
89 specifies the new values for those options. The bit values correspond to those 
90 for the 
91 .I ax_options 
92 field of an XkbDescRec.
93
94 .I XkbSetAccessXTimeout 
95 sends a request to configure the AccessXTimeout control to the server. It does 
96 not wait for a reply, and normally returns True. If a compatible version of the 
97 Xkb extension is not available in the server, 
98 .I XkbSetAccessXTimeout 
99 returns False.
100 .SH "RETURN VALUES"
101 .TP 15
102 True
103 The 
104 .I XkbSetAccessXTimeout
105 function returns True when a compatible version of the Xkb extension is available in the server.
106 .TP 15
107 False
108 The 
109 .I XkbSetAccessXTimeout
110 function returns False when a compatible version of the Xkb extension is not available in the server.
111 .SH STRUCTURES
112 .LP
113 The complete description of an Xkb keyboard is given by an XkbDescRec. The component 
114 structures in the XkbDescRec represent the major Xkb components.
115
116 .nf
117 typedef struct {
118    struct _XDisplay * display;      /\(** connection to X server */
119    unsigned short     flags;        /\(** private to Xkb, do not modify */
120    unsigned short     device_spec;  /\(** device of interest */
121    KeyCode            min_key_code; /\(** minimum keycode for device */
122    KeyCode            max_key_code; /\(** maximum keycode for device */
123    XkbControlsPtr     ctrls;        /\(** controls */
124    XkbServerMapPtr    server;       /\(** server keymap */
125    XkbClientMapPtr    map;          /\(** client keymap */
126    XkbIndicatorPtr    indicators;   /\(** indicator map */
127    XkbNamesPtr        names;        /\(** names for all components */
128    XkbCompatMapPtr    compat;       /\(** compatibility map */
129    XkbGeometryPtr     geom;         /\(** physical geometry of keyboard */
130 } XkbDescRec, *XkbDescPtr;
131
132 .fi
133 The 
134 .I display 
135 field points to an X display structure. The 
136 .I flags field is private to the library: modifying 
137 .I flags 
138 may yield unpredictable results. The 
139 .I device_spec 
140 field specifies the device identifier of the keyboard input device, or 
141 XkbUseCoreKeyboard, which specifies the core keyboard device. The 
142 .I min_key_code
143 and 
144 .I max_key_code 
145 fields specify the least and greatest keycode that can be returned by the keyboard. 
146
147 Each structure component has a corresponding mask bit that is used in function calls to 
148 indicate that the structure should be manipulated in some manner, such as allocating it 
149 or freeing it. These masks and their relationships to the fields in the XkbDescRec are 
150 shown in Table 1.
151
152 .TS
153 c s s
154 l l l
155 l l l.
156 Table 1 Mask Bits for XkbDescRec
157 _
158 Mask Bit        XkbDescRec Field        Value
159 _
160 XkbControlsMask ctrls   (1L<<0)
161 XkbServerMapMask        server  (1L<<1)
162 XkbIClientMapMask       map     (1L<<2)
163 XkbIndicatorMapMask     indicators      (1L<<3)
164 XkbNamesMask    names   (1L<<4)
165 XkbCompatMapMask        compat  (1L<<5)
166 XkbGeometryMask geom    (1L<<6)
167 XkbAllComponentsMask    All Fields      (0x7f)
168 .TE
169
170 The structure for the XkbControlsNotify event is defined as follows:
171 .nf
172
173     typedef struct {
174         int           type;          /\(** Xkb extension base event code */
175         unsigned long serial;        /\(** X server serial number for event */
176         Bool          send_event;    /\(** True => synthetically generated */
177         Display *     display;       /\(** server connection where event generated */
178         Time          time;          /\(** server time when event generated */
179         int           xkb_type;      /\(** XkbCompatMapNotify */
180         int           device;        /\(** Xkb device ID, will not be XkbUseCoreKbd */
181         unsigned int  changed_ctrls; /\(** bits indicating which controls data have changed*/
182         unsigned int  enabled_ctrls; /\(** controls currently enabled in server */
183         unsigned int  enabled_ctrl_changes; /\(** bits indicating enabled/disabled controls */
184         int           num_groups;    /\(** current number of keyboard groups */
185         KeyCode       keycode;       /\(** != 0 => keycode of key causing change */
186         char          event_type;    /\(** Type of event causing change */
187         char          req_major;     /\(** major event code of event causing change */
188         char          req_minor;     /\(** minor event code of event causing change */
189     } XkbControlsNotifyEvent;
190     
191 .fi    
192 .SH "SEE ALSO"
193 .BR XkbChangeEnabledControls (__libmansuffix__)