1XkbSetCompatMap(3)               XKB FUNCTIONS              XkbSetCompatMap(3)
2
3
4

NAME

6       XkbSetCompatMap - Modify the server's compatibility map
7

SYNOPSIS

9       Bool  XkbSetCompatMap (Display *display, unsigned int which, XkbDescPtr
10              xkb, Bool update_actions);
11

ARGUMENTS

13       - display
14              connection to server
15
16       - which
17              mask of compat map components to set
18
19       - xkb  source for compat map components
20
21       - update_actions
22              True => apply to server's keyboard map
23

DESCRIPTION

25       To modify the server's compatibility map, first modify a local copy  of
26       the Xkb compatibility map, then call XkbSetCompatMap.  You may allocate
27       a new compatibility map for this purpose using XkbAllocCompatMap.   You
28       may also use a compatibility map from another server, although you need
29       to adjust the device_spec field in  the  XkbDescRec  accordingly.  Note
30       that symbol interpretations in a compatibility map ( sym_interpret, the
31       vector of XkbSymInterpretRec structures) are also allocated using  this
32       same function.
33
34       XkbSetCompatMap  copies compatibility map information from the keyboard
35       description in xkb to the server specified in display device_spec field
36       of  xkb.   Unless  you have specifically modified this field, it is the
37       default keyboard device.  which specifies the compatibility map  compo‐
38       nents to be set, and is an inclusive OR of the bits shown in Table 1.
39
40
41                 Table 1 Compatibility Map Component Masks
42       ───────────────────────────────────────────────────────────────
43       Mask                 Value    Affecting
44       ───────────────────────────────────────────────────────────────
45       XkbSymInterpMask     (1<<0)   Symbol interpretations
46       XkbGroupCompatMask   (1<<1)   Group maps
47       XkbAllCompatMask     (0x3)    All compatibility map components
48
49       After  updating  its  compatibility  map  for  the specified device, if
50       update_actions is True, the server applies the new compatibility map to
51       its  entire keyboard for the device to generate a new set of key seman‐
52       tics,  compatibility  state,  and  a  new   core   keyboard   map.   If
53       update_actions  is False, the new compatibility map is not used to gen‐
54       erate any modifications to the current device semantics, state, or core
55       keyboard map. One reason for not applying the compatibility map immedi‐
56       ately would be if one server was being configured to match another on a
57       piecemeal  basis;  the  map  should  not be applied until everything is
58       updated. To force an update at a later time, use XkbSetCompatMap speci‐
59       fying which as zero and update_actions as True.
60
61       XkbSetCompatMap  returns  True if successful and False if unsuccessful.
62       The server may  report  problems  it  encounters  when  processing  the
63       request subsequently via protocol errors.
64

RETURN VALUES

66       True           The XkbSetCompatMap function returns True if successful.
67
68       False          The XkbSetCompatMap function returns False if unsuccess‐
69                      ful.
70

STRUCTURES

72       The complete description of an Xkb keyboard is given by an  XkbDescRec.
73       The component structures in the XkbDescRec represent the major Xkb com‐
74       ponents.
75
76       typedef struct {
77          struct _XDisplay * display;      /∗ connection to X server */
78          unsigned short     flags;        /∗ private to Xkb, do not modify */
79          unsigned short     device_spec;  /∗ device of interest */
80          KeyCode            min_key_code; /∗ minimum keycode for device */
81          KeyCode            max_key_code; /∗ maximum keycode for device */
82          XkbControlsPtr     ctrls;        /∗ controls */
83          XkbServerMapPtr    server;       /∗ server keymap */
84          XkbClientMapPtr    map;          /∗ client keymap */
85          XkbIndicatorPtr    indicators;   /∗ indicator map */
86          XkbNamesPtr        names;        /∗ names for all components */
87          XkbCompatMapPtr    compat;       /∗ compatibility map */
88          XkbGeometryPtr     geom;         /∗ physical geometry of keyboard */
89       } XkbDescRec, *XkbDescPtr;
90
91       The display field points to an X display structure. The flags field  is
92       private  to  the  library:  modifying  flags  may  yield  unpredictable
93       results. The device_spec field specifies the device identifier  of  the
94       keyboard  input device, or XkbUseCoreKeyboard, which specifies the core
95       keyboard device. The min_key_code and max_key_code fields  specify  the
96       least and greatest keycode that can be returned by the keyboard.
97
98       Each  structure  component has a corresponding mask bit that is used in
99       function calls to indicate that the structure should be manipulated  in
100       some manner, such as allocating it or freeing it. These masks and their
101       relationships to the fields in the XkbDescRec are shown in Table 2.
102
103
104               Table 2 Mask Bits for XkbDescRec
105       ──────────────────────────────────────────────────
106       Mask Bit               XkbDescRec Field   Value
107       ──────────────────────────────────────────────────
108       XkbControlsMask        ctrls              (1L<<0)
109       XkbServerMapMask       server             (1L<<1)
110       XkbIClientMapMask      map                (1L<<2)
111       XkbIndicatorMapMask    indicators         (1L<<3)
112       XkbNamesMask           names              (1L<<4)
113       XkbCompatMapMask       compat             (1L<<5)
114       XkbGeometryMask        geom               (1L<<6)
115       XkbAllComponentsMask   All Fields         (0x7f)
116
117       The XkbSymInterpretRec structure specifies a symbol interpretation:
118
119           typedef struct {
120               KeySym        sym;         /∗ keysym of interest or NULL */
121               unsigned char flags;       /∗ XkbSI_AutoRepeat, XkbSI_LockingKey */
122               unsigned char match;       /∗ specifies how mods is interpreted */
123               unsigned char mods;        /∗ modifier bits, correspond to eight real modifiers */
124               unsigned char virtual_mod; /∗ 1 modifier to add to key virtual mod map */
125               XkbAnyAction  act;         /∗ action to bind to symbol position on key */
126           } XkbSymInterpretRec,*XkbSymInterpretPtr;
127
128

SEE ALSO

130       XkbAllocCompatMap(3)
131
132
133
134X Version 11                     libX11 1.3.4               XkbSetCompatMap(3)
Impressum