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

NAME

6       XkbSetNames - Change the symbolic names in the server
7

SYNOPSIS

9       Bool  XkbSetNames  (Display  *dpy,  unsigned  int  which,  unsigned int
10              first_type, unsigned int num_types, XkbDescPtr xkb);
11

ARGUMENTS

13       - dpy  connection to the X server
14
15       - which
16              mask of names or map components to be changed
17
18       - first_type
19              first type whose name is to be changed
20
21       - num_types
22              number of types for which names are to be changed
23
24       - xkb  keyboard description from which names are to be taken
25

DESCRIPTION

27       To change the symbolic names in the server, first modify a  local  copy
28       of  the  keyboard  description  and then use either XkbSetNames, or, to
29       save network traffic, use a  XkbNameChangesRecstructure  and  call  Xk‐
30       bChangeNames  to  download  the changes to the server.  XkbSetNames and
31       XkbChangeNames can generate BadAlloc, BadAtom, BadLength, BadMatch, and
32       BadImplementation errors.
33
34       Use XkbSetNames to change many names at the same time. For each bit set
35       in which, XkbSetNames takes the corresponding value (or values  in  the
36       case  of  arrays) from the keyboard description xkb and sends it to the
37       server.
38
39       The first_type and num_types arguments are  used  only  if  XkbKeyType‐
40       NamesMask  or  XkbKTLevelNamesMask is set in which and specify a subset
41       of the types for which the corresponding names are to  be  changed.  If
42       either  or  both of these mask bits are set but the specified types are
43       illegal, XkbSetNames returns False and does not update any of the names
44       specified  in  which.   The specified types are illegal if xkb does not
45       include a map component or if first_type and  num_types  specify  types
46       that are not defined in the keyboard description.
47

STRUCTURES

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

DIAGNOSTICS

125       BadAlloc       Unable to allocate storage
126
127       BadAtom        A name is neither a valid Atom or None
128
129       BadImplementation
130                      Invalid reply from server
131
132       BadLength      The length of a request is shorter or longer  than  that
133                      required to minimally contain the arguments
134
135       BadMatch       A  compatible  version  of  Xkb was not available in the
136                      server or an argument has correct type and range, but is
137                      otherwise invalid
138

SEE ALSO

140       XkbChangeNames(3)
141
142
143
144X Version 11                     libX11 1.8.1                   XkbSetNames(3)
Impressum