1XkbChangeNames(3) XKB FUNCTIONS XkbChangeNames(3)
2
3
4
6 XkbChangeNames - _summary-line_
7
9 Bool XkbChangeNames (Display *dpy, unsigned int which, XkbDescPtr Xkb);
10
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
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
32 XkbChangeNames to download the changes to the server. XkbSetNames and
33 XkbChangeNames can generate BadAlloc, BadAtom, BadLength, BadMatch, and
34 BadImplementation errors.
35
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 */
44 unsigned char first_type; /∗ first key type with a new name */
45 unsigned char num_types; /∗ number of types with new names */
46 unsigned char first_lvl; /∗ first key type with new level
47 names */
48 unsigned char num_lvls; /∗ number of key types with new level
49 names */
50 unsigned char num_aliases; /∗ if key aliases changed, total
51 number of key aliases */
52 unsigned char num_rg; /∗ if radio groups changed, total
53 number of radio groups */
54 unsigned char first_key; /∗ first key with a new name */
55 unsigned char num_keys; /∗ number of keys with new names */
56 unsigned short changed_vmods; /∗ mask of virtual modifiers for
57 which names have changed */
58 unsigned long changed_indicators; /∗ mask of indicators for which names
59 were changed */
60 unsigned char changed_groups; /∗ mask of groups for which names
61 were changed */
62 } XkbNameChangesRec, *XkbNameChangesPtr
63
64 The changed field specifies the name components that have changed and
65 is the bitwise inclusive OR of the valid names mask bits defined in Ta‐
66 ble 1. The rest of the fields in the structure specify the ranges that
67 have changed for the various kinds of symbolic names, as shown in Table
68 2.
69
70 Xkb provides several functions that work with symbolic names. Each of
71 these functions uses a mask to specify individual fields of the struc‐
72 tures described above. These masks and their relationships to the
73 fields in a keyboard description are shown in Table 1.
74
75
76 Table 1 Symbolic Names Masks
77 ─────────────────────────────────────────────────────────────────────────────────
78 Mask Bit Value Keyboard Field
79 Component
80 ─────────────────────────────────────────────────────────────────────────────────
81 XkbKeycodesNameMask (1<<0) Xkb->names keycodes
82 XkbGeometryNameMask (1<<1) Xkb->names geometry
83 XkbSymbolsNameMask (1<<2) Xkb->names symbols
84 XkbPhysSymbolsNameMask (1<<3) Xkb->names phys_symbols
85 XkbTypesNameMask (1<<4) Xkb->names type
86 XkbCompatNameMask (1<<5) Xkb->names compat
87 XkbKeyTypeNamesMask (1<<6) Xkb->map type[*].name
88 XkbKTLevelNamesMask (1<<7) Xkb->map type[*].lvl_names[*]
89 XkbIndicatorNamesMask (1<<8) Xkb->names indicators[*]
90 XkbKeyNamesMask (1<<9) Xkb->names keys[*], num_keys
91 XkbKeyAliasesMask (1<<10) Xkb->names key_aliases[*], num_key_aliases
92 XkbVirtualModNamesMask (1<<11) Xkb->names vmods[*]
93 XkbGroupNamesMask (1<<12) Xkb->names groups[*]
94 XkbRGNamesMask (1<<13) Xkb->names radio_groups[*], num_rg
95 XkbComponentNamesMask (0x3f) Xkb->names keycodes,
96 geometry,
97 symbols,
98 physical symbols,
99 types, and
100 compatibility map
101 XkbAllNamesMask (0x3fff) Xkb->names all name components
102
103
104 Table 2 XkbNameChanges Fields
105 ────────────────────────────────────────────────────────────────────────────────
106 Mask Fields Component Field
107 ────────────────────────────────────────────────────────────────────────────────
108 XkbKeyTypeNamesMask first_type, Xkb->map type[*].name
109 num_types
110 XkbKTLevelNamesMask first_lvl, Xkb->map type[*].lvl_names[*]
111 num_lvls
112 XkbKeyAliasesMask num_aliases Xkb->names key_aliases[*]
113 XkbRGNamesMask num_rg Xkb->names radio_groups[*]
114 XkbKeyNamesMask first_key, Xkb->names keys[*]
115 num_keys
116 XkbVirtualModNamesMask changed_vmods Xkb->names vmods[*]
117 XkbIndicatorNamesMask changed_indicators Xkb->names indicators[*]
118 XkbGroupNamesMask changed_groups Xkb->names groups[*]
119
121 BadAlloc Unable to allocate storage
122
123 BadAtom A name is neither a valid Atom or None
124
125 BadImplementation
126 Invalid reply from server
127
128 BadLength The length of a request is shorter or longer than that
129 required to minimally contain the arguments
130
131 BadMatch A compatible version of Xkb was not available in the
132 server or an argument has correct type and range, but is
133 otherwise invalid
134
136 XkbSetNames(3)
137
138
139
140X Version 11 libX11 1.6.9 XkbChangeNames(3)