Structured log messages with a message registry
[platform/upstream/libxkbcommon.git] / doc / message-registry.md
1 # Error index {#error-index}
2
3 <!--
4 NOTE: This file has been generated automatically by “update-message-registry.py”.
5       Do not edit manually!
6 -->
7
8 This page lists the warnings and errors generated by xkbcommon.
9 There are currently 20 entries.
10
11 @todo The documentation of the log messages is a work in progress.
12
13 ## Index
14
15 | Code      | Identifier                   | Description | Type |
16 | --------- | ---------------------------- | ----------- | ---- |
17 | [XKB-034] | `malformed-number-literal` | Warn on malformed number literals | Error |
18 | [XKB-060] | `unsupported-modifier-mask` | Warn on unsupported modifier mask | Error |
19 | [XKB-107] | `unrecognized-keysym` | Warn on unrecognized keysyms | Warning |
20 | [XKB-183] | `cannot-infer-key-type` | Warn if no key type can be inferred | Warning |
21 | [XKB-237] | `unsupported-group-index` | Warn when a group index is not supported | Error |
22 | [XKB-286] | `undefined-key-type` | Warn if using an undefined key type | Warning |
23 | [XKB-305] | `non-base-group-name` | Warn if a group name was defined for group other than the first one | Warning |
24 | [XKB-312] | `unsupported-shift-level` | Warn when a shift level is not supported | Error |
25 | [XKB-461] | `conflicting-key-symbol` | Warn if there are conflicting keysyms while merging keys | Warning |
26 | [XKB-516] | `extra-symbols-ignored` | <span class="todo">TODO:</span> add description | Warning |
27 | [XKB-578] | `wrong-field-type` | Warn when a field has not the expected type | Error |
28 | [XKB-645] | `unknown-char-escape-sequence` | Warn on unknown escape sequence in string literal | Warning |
29 | [XKB-700] | `multiple-groups-at-once` | Warn if a key defines multiple groups at once | Warning |
30 | [XKB-769] | `invalid-syntax` | The syntax is invalid and the file cannot be parsed | Error |
31 | [XKB-770] | `undefined-keycode` | <span class="todo">TODO:</span> add description | Warning |
32 | [XKB-800] | `conflicting-modmap` | Warn if there are conflicting modmap definitions | Warning |
33 | [XKB-883] | `conflicting-key-action` | Warn if there are conflicting actions while merging keys | Warning |
34 | [XKB-893] | `conflicting-key-type` | Warn if there are conflicting key types while merging groups | Warning |
35 | [XKB-935] | `conflicting-key-fields` | Warn if there are conflicting fields while merging keys | Warning |
36 | [XKB-965] | `unresolved-keymap-symbol` | Warn if using a symbol not defined in the keymap | Warning |
37
38 ## Details
39
40 ### XKB-034 – Malformed number literal {#XKB-034}
41
42 <dl>
43   <dt>Since</dt><dd>1.0.0</dd>
44   <dt>Type</dt><dd>Error</dd>
45   <dt>Summary</dt><dd>Warn on malformed number literals</dd>
46 </dl>
47
48 xkbcommon can parse the following number literal formats:
49
50 - *decimal integer:* 1, 123, etc.
51 - *decimal floating-point number:* 1.23, etc.
52 - *hexadecimal integer:* prefixed with “0x”: 0x123, 0xff, 0xAB, etc.
53
54
55 ### XKB-060 – Unsupported modifier mask {#XKB-060}
56
57 <dl>
58   <dt>Since</dt><dd>1.0.0</dd>
59   <dt>Type</dt><dd>Error</dd>
60   <dt>Summary</dt><dd>Warn on unsupported modifier mask</dd>
61 </dl>
62
63 ### XKB-107 – Unrecognized keysym {#XKB-107}
64
65 <dl>
66   <dt>Since</dt><dd>1.0.0</dd>
67   <dt>Type</dt><dd>Warning</dd>
68   <dt>Summary</dt><dd>Warn on unrecognized keysyms</dd>
69 </dl>
70
71 xkbcommon replaces keysyms it does not recognize by the keysym `NoSymbol`.
72
73 You may find the list of supported keysyms in
74 `include/xkbcommon/xkbcommon-keysyms.h`.
75
76
77 #### Examples
78
79 <details>
80   <summary>Unrecognized keysym “`coma`”</summary>
81
82 **Error message:**
83
84 ```
85 xkbcommon: WARNING: [XKB-107] de:31:20: unrecognized keysym "coma"
86 ```
87
88 xkbcommon does not recognize the keysym “`coma`”. It is most probably
89 a typo for “<code>com<em>m</em>a</code>”.
90 See: `XKB_KEY_comma` in `include/xkbcommon/xkbcommon-keysyms.h`.
91
92 **Fix:**
93   <div class="example-container">
94     <div class="example">
95       <div class="example-inner">
96         <div class="example-title">Before</div>
97 ```c
98 key <AB08> {[ coma, semicolon, periodcentered, multiply ]};
99 ```
100 </div>
101     </div>
102     <div class="example">
103       <div class="example-inner">
104         <div class="example-title">After</div>
105 ```c
106 key <AB08> {[ comma, semicolon, periodcentered, multiply ]};
107 ```
108 </div>
109     </div>
110   </div>
111 </details>
112
113 ### XKB-183 – Cannot infer key type {#XKB-183}
114
115 <dl>
116   <dt>Since</dt><dd>1.0.0</dd>
117   <dt>Type</dt><dd>Warning</dd>
118   <dt>Summary</dt><dd>Warn if no key type can be inferred</dd>
119 </dl>
120
121 ### XKB-237 – Unsupported group index {#XKB-237}
122
123 <dl>
124   <dt>Since</dt><dd>1.0.0</dd>
125   <dt>Type</dt><dd>Error</dd>
126   <dt>Summary</dt><dd>Warn when a group index is not supported</dd>
127 </dl>
128
129 xkbcommon supports group index in the range (1..4).
130
131
132 ### XKB-286 – Undefined key type {#XKB-286}
133
134 <dl>
135   <dt>Since</dt><dd>1.0.0</dd>
136   <dt>Type</dt><dd>Warning</dd>
137   <dt>Summary</dt><dd>Warn if using an undefined key type</dd>
138 </dl>
139
140 ### XKB-305 – Non base group name {#XKB-305}
141
142 <dl>
143   <dt>Since</dt><dd>1.0.0</dd>
144   <dt>Type</dt><dd>Warning</dd>
145   <dt>Summary</dt><dd>Warn if a group name was defined for group other than the first one</dd>
146 </dl>
147
148 ### XKB-312 – Unsupported shift level {#XKB-312}
149
150 <dl>
151   <dt>Since</dt><dd>1.0.0</dd>
152   <dt>Type</dt><dd>Error</dd>
153   <dt>Summary</dt><dd>Warn when a shift level is not supported</dd>
154 </dl>
155
156 Shift levels are _one_-indexed. xkbcommon supports two formats of shift levels:
157 as numbers and as identifiers `LevelN`, where `N` is in the range (1..8).
158
159
160 ### XKB-461 – Conflicting key symbol {#XKB-461}
161
162 <dl>
163   <dt>Since</dt><dd>1.0.0</dd>
164   <dt>Type</dt><dd>Warning</dd>
165   <dt>Summary</dt><dd>Warn if there are conflicting keysyms while merging keys</dd>
166 </dl>
167
168 ### XKB-516 – Extra symbols ignored {#XKB-516}
169
170 <dl>
171   <dt>Since</dt><dd>1.0.0</dd>
172   <dt>Type</dt><dd>Warning</dd>
173   <dt>Summary</dt><dd><span class="todo">TODO:</span> add description</dd>
174 </dl>
175
176 ### XKB-578 – Wrong field type {#XKB-578}
177
178 <dl>
179   <dt>Since</dt><dd>1.0.0</dd>
180   <dt>Type</dt><dd>Error</dd>
181   <dt>Summary</dt><dd>Warn when a field has not the expected type</dd>
182 </dl>
183
184 ### XKB-645 – Unknown char escape sequence {#XKB-645}
185
186 <dl>
187   <dt>Since</dt><dd>1.0.0</dd>
188   <dt>Type</dt><dd>Warning</dd>
189   <dt>Summary</dt><dd>Warn on unknown escape sequence in string literal</dd>
190 </dl>
191
192 xkbcommon support the following escape sequences in string literals:
193
194 | Escape sequence | Corresponding character             |
195 | --------------- | ----------------------------------- |
196 | `\b`            | `U+0008` Backspace                  |
197 | `\t`            | `U+0009` Character tabulation       |
198 | `\n`            | `U+000A` Line feed                  |
199 | `\v`            | `U+000B` Vertical tabulation        |
200 | `\f`            | `U+000C` Form feed                  |
201 | `\r`            | `U+000D` Carriage return            |
202 | `\e`            | `U+001B` Escape                     |
203 | `\\`            | `U+005C` Backslash                  |
204 | `\NNN`          | _Octal_ escape, from `\0` to `\777` |
205
206
207 ### XKB-700 – Multiple groups at once {#XKB-700}
208
209 <dl>
210   <dt>Since</dt><dd>1.0.0</dd>
211   <dt>Type</dt><dd>Warning</dd>
212   <dt>Summary</dt><dd>Warn if a key defines multiple groups at once</dd>
213 </dl>
214
215 ### XKB-769 – Invalid syntax {#XKB-769}
216
217 <dl>
218   <dt>Since</dt><dd>1.0.0</dd>
219   <dt>Type</dt><dd>Error</dd>
220   <dt>Summary</dt><dd>The syntax is invalid and the file cannot be parsed</dd>
221 </dl>
222
223 ### XKB-770 – Undefined keycode {#XKB-770}
224
225 <dl>
226   <dt>Since</dt><dd>1.0.0</dd>
227   <dt>Type</dt><dd>Warning</dd>
228   <dt>Summary</dt><dd><span class="todo">TODO:</span> add description</dd>
229 </dl>
230
231 ### XKB-800 – Conflicting modmap {#XKB-800}
232
233 <dl>
234   <dt>Since</dt><dd>1.0.0</dd>
235   <dt>Type</dt><dd>Warning</dd>
236   <dt>Summary</dt><dd>Warn if there are conflicting modmap definitions</dd>
237 </dl>
238
239 @todo detailed explanation and examples
240
241
242 ### XKB-883 – Conflicting key action {#XKB-883}
243
244 <dl>
245   <dt>Since</dt><dd>1.0.0</dd>
246   <dt>Type</dt><dd>Warning</dd>
247   <dt>Summary</dt><dd>Warn if there are conflicting actions while merging keys</dd>
248 </dl>
249
250 ### XKB-893 – Conflicting key type {#XKB-893}
251
252 <dl>
253   <dt>Since</dt><dd>1.0.0</dd>
254   <dt>Type</dt><dd>Warning</dd>
255   <dt>Summary</dt><dd>Warn if there are conflicting key types while merging groups</dd>
256 </dl>
257
258 ### XKB-935 – Conflicting key fields {#XKB-935}
259
260 <dl>
261   <dt>Since</dt><dd>1.0.0</dd>
262   <dt>Type</dt><dd>Warning</dd>
263   <dt>Summary</dt><dd>Warn if there are conflicting fields while merging keys</dd>
264 </dl>
265
266 ### XKB-965 – Unresolved keymap symbol {#XKB-965}
267
268 <dl>
269   <dt>Since</dt><dd>1.0.0</dd>
270   <dt>Type</dt><dd>Warning</dd>
271   <dt>Summary</dt><dd>Warn if using a symbol not defined in the keymap</dd>
272 </dl>
273
274 [XKB-034]: @ref XKB-034
275 [XKB-060]: @ref XKB-060
276 [XKB-107]: @ref XKB-107
277 [XKB-183]: @ref XKB-183
278 [XKB-237]: @ref XKB-237
279 [XKB-286]: @ref XKB-286
280 [XKB-305]: @ref XKB-305
281 [XKB-312]: @ref XKB-312
282 [XKB-461]: @ref XKB-461
283 [XKB-516]: @ref XKB-516
284 [XKB-578]: @ref XKB-578
285 [XKB-645]: @ref XKB-645
286 [XKB-700]: @ref XKB-700
287 [XKB-769]: @ref XKB-769
288 [XKB-770]: @ref XKB-770
289 [XKB-800]: @ref XKB-800
290 [XKB-883]: @ref XKB-883
291 [XKB-893]: @ref XKB-893
292 [XKB-935]: @ref XKB-935
293 [XKB-965]: @ref XKB-965