1XkbSetCompatMap(3) XKB FUNCTIONS XkbSetCompatMap(3)
2
3
4
6 XkbSetCompatMap - Modify the server's compatibility map
7
9 Bool XkbSetCompatMap (Display *display, unsigned int which, XkbDescPtr
10 xkb, Bool update_actions);
11
13 display
14 connection to server
15
16 which mask of compat map components to set
17
18 xkb source for compat map components
19
20 update_actions
21 True => apply to server's keyboard map
22
24 To modify the server's compatibility map, first modify a local copy of
25 the Xkb compatibility map, then call XkbSetCompatMap. You may allocate
26 a new compatibility map for this purpose using XkbAllocCompatMap. You
27 may also use a compatibility map from another server, although you need
28 to adjust the device_spec field in the XkbDescRec accordingly. Note
29 that symbol interpretations in a compatibility map ( sym_interpret, the
30 vector of XkbSymInterpretRec structures) are also allocated using this
31 same function. XkbSetCompatMap copies compatibility map information
32 from the keyboard description in xkb to the server specified in dis‐
33 play's compatibility map for the device specified by the device_spec
34 field of xkb. Unless you have specifically modified this field, it is
35 the default keyboard device. which specifies the compatibility map
36 components to be set, and is an inclusive OR of the bits shown in Table
37 1.
38
39
40 Table 1 Compatibility Map Component Masks
41 ───────────────────────────────────────────────────────────────
42 Mask Value Affecting
43 ───────────────────────────────────────────────────────────────
44 XkbSymInterpMask (1<<0) Symbol interpretations
45 XkbGroupCompatMask (1<<1) Group maps
46 XkbAllCompatMask (0x3) All compatibility map components
47
48 After updating its compatibility map for the specified device, if up‐
49 date_actions is True, the server applies the new compatibility map to
50 its entire keyboard for the device to generate a new set of key seman‐
51 tics, compatibility state, and a new core keyboard map. If update_ac‐
52 tions is False, the new compatibility map is not used to generate any
53 modifications to the current device semantics, state, or core keyboard
54 map. One reason for not applying the compatibility map immediately
55 would be if one server was being configured to match another on a
56 piecemeal basis; the map should not be applied until everything is up‐
57 dated. To force an update at a later time, use XkbSetCompatMap specify‐
58 ing which as zero and update_actions as True. XkbSetCompatMap returns
59 True if successful and False if unsuccessful. The server may report
60 problems it encounters when processing the request subsequently via
61 protocol errors.
62
64 True The XkbSetCompatMap function returns True if successful.
65
66 False The XkbSetCompatMap function returns False if unsuccess‐
67 ful.
68
70 The complete description of an Xkb keyboard is given by an XkbDescRec.
71 The component structures in the XkbDescRec represent the major Xkb com‐
72 ponents.
73
74 typedef struct {
75 struct _XDisplay *display; /* connection to X server */
76 unsigned short flags; /* private to Xkb, do not modify */
77 unsigned short device_spec; /* device of interest */
78 KeyCode min_key_code; /* minimum keycode for device */
79 KeyCode max_key_code; /* maximum keycode for device */
80 XkbControlsPtr ctrls; /* controls */
81 XkbServerMapPtr server; /* server keymap */
82 XkbClientMapPtr map; /* client keymap */
83 XkbIndicatorPtr indicators; /* indicator map */
84 XkbNamesPtr names; /* names for all components */
85 XkbCompatMapPtr compat; /* compatibility map */
86 XkbGeometryPtr geom; /* physical geometry of keyboard */
87 } XkbDescRec, *XkbDescPtr;
88
89
90 The display field points to an X display structure. The flags field is
91 private to the library: modifying flags may yield unpredictable re‐
92 sults. The device_spec field specifies the device identifier of the
93 keyboard input device, or XkbUseCoreKeyboard, which specifies the core
94 keyboard device. The min_key_code and max_key_code fields specify the
95 least and greatest keycode that can be returned by the keyboard.
96
97 Each structure component has a corresponding mask bit that is used in
98 function calls to indicate that the structure should be manipulated in
99 some manner, such as allocating it or freeing it. These masks and their
100 relationships to the fields in the XkbDescRec are shown in Table 2.
101
102
103 Table 2 Mask Bits for XkbDescRec
104 ──────────────────────────────────────────────────
105 Mask Bit XkbDescRec Field Value
106 ──────────────────────────────────────────────────
107 XkbControlsMask ctrls (1L<<0)
108 XkbServerMapMask server (1L<<1)
109 XkbIClientMapMask map (1L<<2)
110 XkbIndicatorMapMask indicators (1L<<3)
111 XkbNamesMask names (1L<<4)
112 XkbCompatMapMask compat (1L<<5)
113 XkbGeometryMask geom (1L<<6)
114 XkbAllComponentsMask All Fields (0x7f)
115
116 The XkbSymInterpretRec structure specifies a symbol interpretation:
117
118 typedef struct {
119 KeySym sym; /* keysym of interest or NULL */
120 unsigned char flags; /* XkbSI_AutoRepeat, XkbSI_LockingKey */
121 unsigned char match; /* specifies how mods is interpreted */
122 unsigned char mods; /* modifier bits, correspond to eight real modifiers */
123 unsigned char virtual_mod; /* 1 modifier to add to key virtual mod map */
124 XkbAnyAction act; /* action to bind to symbol position on key */
125 } XkbSymInterpretRec,*XkbSymInterpretPtr;
126
127
129 XkbAllocCompatMap(3)
130
131
132
133X Version 11 libX11 1.7.2 XkbSetCompatMap(3)