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

NAME

6       XkbChangeNames - _summary-line_
7

SYNOPSIS

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

ARGUMENTS

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

DESCRIPTION

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

STRUCTURES

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

DIAGNOSTICS

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

SEE ALSO

128       XkbSetNames(3)
129
130
131
132X Version 11                     libX11 1.8.1                XkbChangeNames(3)
Impressum