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

NAME

6       XkbChangeNames - Change symbolic names in the server
7

SYNOPSIS

9       Bool XkbChangeNames (Display *dpy, unsigned int which, XkbDescPtr xkb);
10

ARGUMENTS

12       dpy    connection to the X server
13
14       which  mask of names or map components to be updated
15
16       xkb    keyboard description to be updated
17

DESCRIPTION

19       XkbChangeNames  provides  a  more flexible method for changing symbolic
20       names than XkbSetNames and requires the  use  of  an  XkbNameChangesRec
21       structure.
22
23       XkbChangeNames  copies any names specified by changes from the keyboard
24       description, xkb, to the X  server  specified  by  dpy.  XkbChangeNames
25       aborts  and returns False if any illegal type names or type shift level
26       names are specified by changes.
27
28       To change the symbolic names in the server, first modify a  local  copy
29       of  the  keyboard  description  and then use either XkbSetNames, or, to
30       save network traffic, use a XkbNameChangesRec structure  and  call  Xk‐
31       bChangeNames  to  download  the changes to the server.  XkbSetNames and
32       XkbChangeNames can generate BadAlloc, BadAtom, BadLength, BadMatch, and
33       BadImplementation errors.
34

STRUCTURES

36       The  XkbNameChangesRec  allows applications to identify small modifica‐
37       tions to the symbolic names and effectively reduces the amount of traf‐
38       fic sent to the server:
39
40           typedef struct _XkbNameChanges {
41               unsigned int   changed;            /* name components that have changed */
42               unsigned char  first_type;         /* first key type with a new name */
43               unsigned char  num_types;          /* number of types with new names */
44               unsigned char  first_lvl;          /* first key type with new level names */
45               unsigned char  num_lvls;           /* number of key types with new level names */
46               unsigned char  num_aliases;        /* if key aliases changed, total number of key aliases */
47               unsigned char  num_rg;             /* if radio groups changed, total number of radio groups */
48               unsigned char  first_key;          /* first key with a new name */
49               unsigned char  num_keys;           /* number of keys with new names */
50               unsigned short changed_vmods;      /* mask of virtual modifiers for which names have changed */
51               unsigned long  changed_indicators; /* mask of indicators for which names were changed */
52               unsigned char  changed_groups;     /* mask of groups for which names were changed */
53           } XkbNameChangesRec, *XkbNameChangesPtr
54
55       The  changed  field specifies the name components that have changed and
56       is the bitwise inclusive OR of the valid names mask bits defined in Ta‐
57       ble  1. The rest of the fields in the structure specify the ranges that
58       have changed for the various kinds of symbolic names, as shown in Table
59       2.
60
61       Xkb  provides  several functions that work with symbolic names. Each of
62       these functions uses a mask to specify individual fields of the  struc‐
63       tures  described  above.  These  masks  and  their relationships to the
64       fields in a keyboard description are shown in Table 1.
65
66
67                                 Table 1 Symbolic Names Masks
68       ─────────────────────────────────────────────────────────────────────────────────
69       Mask Bit                 Value      Keyboard     Field
70                                           Component
71       ─────────────────────────────────────────────────────────────────────────────────
72       XkbKeycodesNameMask      (1<<0)     Xkb->names   keycodes
73       XkbGeometryNameMask      (1<<1)     Xkb->names   geometry
74       XkbSymbolsNameMask       (1<<2)     Xkb->names   symbols
75       XkbPhysSymbolsNameMask   (1<<3)     Xkb->names   phys_symbols
76       XkbTypesNameMask         (1<<4)     Xkb->names   type
77       XkbCompatNameMask        (1<<5)     Xkb->names   compat
78       XkbKeyTypeNamesMask      (1<<6)     Xkb->map     type[*].name
79       XkbKTLevelNamesMask      (1<<7)     Xkb->map     type[*].lvl_names[*]
80       XkbIndicatorNamesMask    (1<<8)     Xkb->names   indicators[*]
81       XkbKeyNamesMask          (1<<9)     Xkb->names   keys[*], num_keys
82       XkbKeyAliasesMask        (1<<10)    Xkb->names   key_aliases[*], num_key_aliases
83       XkbVirtualModNamesMask   (1<<11)    Xkb->names   vmods[*]
84       XkbGroupNamesMask        (1<<12)    Xkb->names   groups[*]
85       XkbRGNamesMask           (1<<13)    Xkb->names   radio_groups[*], num_rg
86       XkbComponentNamesMask    (0x3f)     Xkb->names   keycodes,
87                                                        geometry,
88                                                        symbols,
89                                                        physical symbols,
90                                                        types, and
91                                                        compatibility map
92       XkbAllNamesMask          (0x3fff)   Xkb->names   all name components
93
94
95                                Table 2 XkbNameChanges Fields
96       ────────────────────────────────────────────────────────────────────────────────
97       Mask                     Fields               Component    Field
98       ────────────────────────────────────────────────────────────────────────────────
99       XkbKeyTypeNamesMask      first_type,          Xkb->map     type[*].name
100                                num_types
101       XkbKTLevelNamesMask      first_lvl,           Xkb->map     type[*].lvl_names[*]
102                                num_lvls
103       XkbKeyAliasesMask        num_aliases          Xkb->names   key_aliases[*]
104       XkbRGNamesMask           num_rg               Xkb->names   radio_groups[*]
105       XkbKeyNamesMask          first_key,           Xkb->names   keys[*]
106                                num_keys
107       XkbVirtualModNamesMask   changed_vmods        Xkb->names   vmods[*]
108       XkbIndicatorNamesMask    changed_indicators   Xkb->names   indicators[*]
109       XkbGroupNamesMask        changed_groups       Xkb->names   groups[*]
110

DIAGNOSTICS

112       BadAlloc       Unable to allocate storage
113
114       BadAtom        A name is neither a valid Atom or None
115
116       BadImplementation
117                      Invalid reply from server
118
119       BadLength      The length of a request is shorter or longer  than  that
120                      required to minimally contain the arguments
121
122       BadMatch       A  compatible  version  of  Xkb was not available in the
123                      server or an argument has correct type and range, but is
124                      otherwise invalid
125

SEE ALSO

127       XkbSetNames(3)
128
129
130
131X Version 11                     libX11 1.8.7                XkbChangeNames(3)
Impressum