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 XkbSetCompatMap __libmansuffix__ __xorgversion__ "XKB FUNCTIONS"
25 XkbSetCompatMap \- Modify the server's compatibility map
28 .B Bool XkbSetCompatMap
29 .BI "(\^Display *" "display" "\^,"
30 .BI "unsigned int " "which" "\^,"
31 .BI "XkbDescPtr " "xkb" "\^,"
32 .BI "Bool " "update_actions" "\^);"
41 mask of compat map components to set
44 source for compat map components
47 True => apply to server's keyboard map
50 To modify the server's compatibility map, first modify a local copy of the Xkb
51 compatibility map, then call
53 You may allocate a new compatibility map for this purpose using
55 You may also use a compatibility map from another server, although you need to
58 field in the XkbDescRec accordingly. Note that symbol interpretations in a
61 the vector of XkbSymInterpretRec structures) are also allocated using this same
65 copies compatibility map information from the keyboard description in
67 to the server specified in
69 's compatibility map for the device specified by the
73 Unless you have specifically modified this field, it is the default keyboard
76 specifies the compatibility map components to be set, and is an inclusive OR of
77 the bits shown in Table 1.
83 Table 1 Compatibility Map Component Masks
87 XkbSymInterpMask (1<<0) Symbol interpretations
88 XkbGroupCompatMask (1<<1) Group maps
89 XkbAllCompatMask (0x3) All compatibility map components
92 After updating its compatibility map for the specified device, if
94 is True, the server applies the new compatibility map to its entire keyboard for
95 the device to generate a new set of key semantics, compatibility state, and a
96 new core keyboard map. If
98 is False, the new compatibility map is not used to generate any modifications to
99 the current device semantics, state, or core keyboard map. One reason for not
100 applying the compatibility map immediately would be if one server was being
101 configured to match another on a piecemeal basis; the map should not be applied
102 until everything is updated. To force an update at a later time, use
111 returns True if successful and False if unsuccessful. The server may report
112 problems it encounters when processing the request subsequently via protocol
119 function returns True if successful.
124 function returns False if unsuccessful.
127 The complete description of an Xkb keyboard is given by an XkbDescRec. The
129 structures in the XkbDescRec represent the major Xkb components.
133 struct _XDisplay * display; /\(** connection to X server */
134 unsigned short flags; /\(** private to Xkb, do not modify */
135 unsigned short device_spec; /\(** device of interest */
136 KeyCode min_key_code; /\(** minimum keycode for device */
137 KeyCode max_key_code; /\(** maximum keycode for device */
138 XkbControlsPtr ctrls; /\(** controls */
139 XkbServerMapPtr server; /\(** server keymap */
140 XkbClientMapPtr map; /\(** client keymap */
141 XkbIndicatorPtr indicators; /\(** indicator map */
142 XkbNamesPtr names; /\(** names for all components */
143 XkbCompatMapPtr compat; /\(** compatibility map */
144 XkbGeometryPtr geom; /\(** physical geometry of keyboard */
145 } XkbDescRec, *XkbDescPtr;
150 field points to an X display structure. The
151 .I flags field is private to the library: modifying
153 may yield unpredictable results. The
155 field specifies the device identifier of the keyboard input device, or
156 XkbUseCoreKeyboard, which specifies the core keyboard device. The
160 fields specify the least and greatest keycode that can be returned by the
163 Each structure component has a corresponding mask bit that is used in function
165 indicate that the structure should be manipulated in some manner, such as
167 or freeing it. These masks and their relationships to the fields in the
175 Table 2 Mask Bits for XkbDescRec
177 Mask Bit XkbDescRec Field Value
179 XkbControlsMask ctrls (1L<<0)
180 XkbServerMapMask server (1L<<1)
181 XkbIClientMapMask map (1L<<2)
182 XkbIndicatorMapMask indicators (1L<<3)
183 XkbNamesMask names (1L<<4)
184 XkbCompatMapMask compat (1L<<5)
185 XkbGeometryMask geom (1L<<6)
186 XkbAllComponentsMask All Fields (0x7f)
189 The XkbSymInterpretRec structure specifies a symbol interpretation:
193 KeySym sym; /\(** keysym of interest or NULL */
194 unsigned char flags; /\(** XkbSI_AutoRepeat, XkbSI_LockingKey */
195 unsigned char match; /\(** specifies how mods is interpreted */
196 unsigned char mods; /\(** modifier bits, correspond to eight real modifiers */
197 unsigned char virtual_mod; /\(** 1 modifier to add to key virtual mod map */
198 XkbAnyAction act; /\(** action to bind to symbol position on key */
199 } XkbSymInterpretRec,*XkbSymInterpretPtr;
203 .BR XkbAllocCompatMap (__libmansuffix__)