1 .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
3 .\" Permission is hereby granted, free of charge, to any person obtaining
4 .\" a copy of this software and associated documentation files (the
5 .\" "Software"), to deal in the Software without restriction, including
6 .\" without limitation the rights to use, copy, modify, merge, publish,
7 .\" distribute, sublicense, and/or sell copies of the Software, and to
8 .\" permit persons to whom the Software is furnished to do so, subject to
9 .\" the following conditions:
11 .\" The above copyright notice and this permission notice shall be included
12 .\" in all copies or substantial portions of the Software.
14 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 .\" OTHER DEALINGS IN THE SOFTWARE.
22 .\" Except as contained in this notice, the name of the X Consortium shall
23 .\" not be used in advertising or otherwise to promote the sale, use or
24 .\" other dealings in this Software without prior written authorization
25 .\" from the X Consortium.
27 .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
28 .\" Digital Equipment Corporation
30 .\" Portions Copyright \(co 1990, 1991 by
33 .\" Permission to use, copy, modify and distribute this documentation for
34 .\" any purpose and without fee is hereby granted, provided that the above
35 .\" copyright notice appears in all copies and that both that copyright notice
36 .\" and this permission notice appear in all copies, and that the names of
37 .\" Digital and Tektronix not be used in in advertising or publicity pertaining
38 .\" to this documentation without specific, written prior permission.
39 .\" Digital and Tektronix makes no representations about the suitability
40 .\" of this documentation for any purpose.
41 .\" It is provided ``as is'' without express or implied warranty.
44 .ds xT X Toolkit Intrinsics \- C Language Interface
45 .ds xW Athena X Widgets \- C Language X Toolkit Interface
46 .ds xL Xlib \- C Language X Interface
47 .ds xC Inter-Client Communication Conventions Manual
54 .\".if \\n(VS>=40 .vs \\n(VSu
55 .\".if \\n(VS<=39 .vs \\n(VSp
78 .de IN \" send an index entry to the stderr
85 .\" choose appropriate monospace font
86 .\" the imagen conditional, 480,
87 .\" may be changed to L if LB is too
88 .\" heavy for your eyes...
90 .ie "\\*(.T"480" .ft L
91 .el .ie "\\*(.T"300" .ft L
92 .el .ie "\\*(.T"202" .ft PO
93 .el .ie "\\*(.T"aps" .ft CW
96 .ie \\n(VS>40 .vs \\n(VSu
104 .ie t \\$1\fB\^\\$2\^\fR\\$3
105 .el \\$1\fI\^\\$2\^\fP\\$3
108 .ie t \fB\^\\$1\^\fR\\$2
109 .el \fI\^\\$1\^\fP\\$2
112 .ie t <\fB\\$1\fR>\\$2
118 .if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2
119 .if \\n(.$ .if !'\\$1'C' .ds NO \\$1
133 . \" Note End -- doug kraft 3/85
142 .TH XChangeKeyboardMapping __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
144 XChangeKeyboardMapping, XGetKeyboardMapping, XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping, XNewModifiermap, XInsertModifiermapEntry, XDeleteModifiermapEntry, XFreeModifiermap, XModifierKeymap \- manipulate keyboard encoding and keyboard encoding structure
147 int XChangeKeyboardMapping(\^Display *\fIdisplay\fP, int \fIfirst_keycode\fP,
148 int \fIkeysyms_per_keycode\fP, KeySym *\fIkeysyms\fP, int \fInum_codes\fP\^);
150 KeySym *XGetKeyboardMapping(\^Display *\fIdisplay\fP, KeyCode
151 \fIfirst_keycode\fP, int \fIkeycode_count\fP, int
152 *\fIkeysyms_per_keycode_return\fP\^);
154 int XDisplayKeycodes\^(\^Display *\fIdisplay\fP\^, int
155 *\fImin_keycodes_return\fP\^, int *\fImax_keycodes_return\fP\^);
157 int XSetModifierMapping(\^Display *\fIdisplay\fP, XModifierKeymap
160 XModifierKeymap *XGetModifierMapping(\^Display *\fIdisplay\fP\^);
162 XModifierKeymap *XNewModifiermap(\^int \fImax_keys_per_mod\fP\^);
164 XModifierKeymap *XInsertModifiermapEntry\^(\^XModifierKeymap *\fImodmap\fP,
165 KeyCode \fIkeycode_entry\fP, int \fImodifier\fP\^);
167 XModifierKeymap *XDeleteModifiermapEntry\^(\^XModifierKeymap *\fImodmap\fP,
168 KeyCode \fIkeycode_entry\fP, int \fImodifier\fP\^);
170 int XFreeModifiermap(\^XModifierKeymap *\fImodmap\fP\^);
173 Specifies the connection to the X server.
174 .ds Kc changed or returned
175 .IP \fIfirst_keycode\fP 1i
176 Specifies the first KeyCode that is to be \*(Kc.
177 .IP \fIkeycode_count\fP 1i
178 Specifies the number of KeyCodes that are to be returned.
179 .IP \fIkeycode_entry\fP 1i
180 Specifies the KeyCode.
182 Specifies an array of KeySyms.
183 .IP \fIkeysyms_per_keycode\fP 1i
184 Specifies the number of KeySyms per KeyCode.
185 .IP \fIkeysyms_per_keycode_return\fP 1i
186 Returns the number of KeySyms per KeyCode.
187 .IP \fImax_keys_per_mod\fP 1i
188 Specifies the number of KeyCode entries preallocated to the modifiers
190 .IP \fImax_keycodes_return\fP 1i
191 Returns the maximum number of KeyCodes.
192 .IP \fImin_keycodes_return\fP 1i
193 Returns the minimum number of KeyCodes.
194 .IP \fImodifier\fP 1i
195 Specifies the modifier.
200 .IP \fInum_codes\fP 1i
201 Specifies the number of KeyCodes that are to be changed.
204 .ZN XChangeKeyboardMapping
205 function defines the symbols for the specified number of KeyCodes
206 starting with first_keycode.
207 The symbols for KeyCodes outside this range remain unchanged.
208 The number of elements in keysyms must be:
211 num_codes * keysyms_per_keycode
214 The specified first_keycode must be greater than or equal to min_keycode
216 .ZN XDisplayKeycodes ,
220 In addition, the following expression must be less than or equal to
221 max_keycode as returned by
222 .ZN XDisplayKeycodes ,
228 first_keycode + num_codes \- 1
231 KeySym number N, counting from zero, for KeyCode K has the following index
232 in keysyms, counting from zero:
235 (K \- first_keycode) * keysyms_per_keycode + N
238 The specified keysyms_per_keycode can be chosen arbitrarily by the client
239 to be large enough to hold all desired symbols.
240 A special KeySym value of
242 should be used to fill in unused elements
243 for individual KeyCodes.
246 to appear in nontrailing positions
247 of the effective list for a KeyCode.
248 .ZN XChangeKeyboardMapping
253 There is no requirement that the X server interpret this mapping.
254 It is merely stored for reading and writing by clients.
256 .ZN XChangeKeyboardMapping
264 .ZN XGetKeyboardMapping
265 function returns the symbols for the specified number of KeyCodes
266 starting with first_keycode.
267 The value specified in first_keycode must be greater than
268 or equal to min_keycode as returned by
269 .ZN XDisplayKeycodes ,
273 In addition, the following expression must be less than or equal
274 to max_keycode as returned by
275 .ZN XDisplayKeycodes :
278 first_keycode + keycode_count \- 1
281 If this is not the case, a
284 The number of elements in the KeySyms list is:
287 keycode_count * keysyms_per_keycode_return
290 KeySym number N, counting from zero, for KeyCode K has the following index
291 in the list, counting from zero:
293 (K \- first_code) * keysyms_per_code_return + N
296 The X server arbitrarily chooses the keysyms_per_keycode_return value
297 to be large enough to report all requested symbols.
298 A special KeySym value of
300 is used to fill in unused elements for
302 To free the storage returned by
303 .ZN XGetKeyboardMapping ,
307 .ZN XGetKeyboardMapping
314 function returns the min-keycodes and max-keycodes supported by the
316 The minimum number of KeyCodes returned is never less than 8,
317 and the maximum number of KeyCodes returned is never greater than 255.
318 Not all KeyCodes in this range are required to have corresponding keys.
321 .ZN XSetModifierMapping
322 function specifies the KeyCodes of the keys (if any) that are to be used
325 the X server generates a
328 .ZN XSetModifierMapping
331 X permits at most 8 modifier keys.
332 If more than 8 are specified in the
338 The modifiermap member of the
340 structure contains 8 sets of max_keypermod KeyCodes,
341 one for each modifier in the order
351 Only nonzero KeyCodes have meaning in each set,
352 and zero KeyCodes are ignored.
353 In addition, all of the nonzero KeyCodes must be in the range specified by
354 min_keycode and max_keycode in the
361 An X server can impose restrictions on how modifiers can be changed,
363 if certain keys do not generate up transitions in hardware,
364 if auto-repeat cannot be disabled on certain keys,
365 or if multiple modifier keys are not supported.
366 If some such restriction is violated,
369 and none of the modifiers are changed.
370 If the new KeyCodes specified for a modifier differ from those
371 currently defined and any (current or new) keys for that modifier are
372 in the logically down state,
373 .ZN XSetModifierMapping
376 and none of the modifiers is changed.
378 .ZN XSetModifierMapping
386 .ZN XGetModifierMapping
387 function returns a pointer to a newly created
389 structure that contains the keys being used as modifiers.
390 The structure should be freed after use by calling
391 .ZN XFreeModifiermap .
392 If only zero values appear in the set for any modifier,
393 that modifier is disabled.
397 function returns a pointer to
399 structure for later use.
402 .ZN XInsertModifiermapEntry
403 function adds the specified KeyCode to the set that controls the specified
404 modifier and returns the resulting
406 structure (expanded as needed).
409 .ZN XDeleteModifiermapEntry
410 function deletes the specified KeyCode from the set that controls the
411 specified modifier and returns a pointer to the resulting
417 function frees the specified
429 int max_keypermod; /\&* This server's max number of keys per modifier */
430 KeyCode *modifiermap; /\&* An 8 by max_keypermod array of the modifiers */
436 The server failed to allocate the requested resource or server memory.
439 Some numeric value falls outside the range of values accepted by the request.
440 Unless a specific range is specified for an argument, the full range defined
441 by the argument's type is accepted. Any argument defined as a set of
442 alternatives can generate this error.
444 XFree(__libmansuffix__),
445 XkbGetMap(__libmansuffix__),
446 XSetPointerMapping(__libmansuffix__)