-->
This page lists the warnings and errors generated by xkbcommon.
-There are currently 20 entries.
+There are currently 21 entries.
@todo The documentation of the log messages is a work in progress.
| [XKB-305] | `non-base-group-name` | Warn if a group name was defined for group other than the first one | Warning |
| [XKB-312] | `unsupported-shift-level` | Warn when a shift level is not supported | Error |
| [XKB-461] | `conflicting-key-symbol` | Warn if there are conflicting keysyms while merging keys | Warning |
+| [XKB-489] | `numeric-keysym` | Warn on numeric keysym (other than 0-9) | Warning |
| [XKB-516] | `extra-symbols-ignored` | <span class="todo">TODO:</span> add description | Warning |
| [XKB-578] | `wrong-field-type` | Warn when a field has not the expected type | Error |
| [XKB-645] | `unknown-char-escape-sequence` | Warn on unknown escape sequence in string literal | Warning |
<dt>Summary</dt><dd>Warn if there are conflicting keysyms while merging keys</dd>
</dl>
+### XKB-489 – Numeric keysym {#XKB-489}
+
+<dl>
+ <dt>Since</dt><dd>1.6.0</dd>
+ <dt>Type</dt><dd>Warning</dd>
+ <dt>Summary</dt><dd>Warn on numeric keysym (other than 0-9)</dd>
+</dl>
+
+Numeric keysyms are not human-friendly. Use the corresponding named keysym
+or Unicode keysym, if available.
+
+
+#### Examples
+
+<details>
+ <summary>Hexadecimal keysym `0x1001ed0`</summary>
+
+**Error message:**
+
+```
+xkbcommon: WARNING: [XKB-489] numeric keysym "0x1001ed0"
+```
+
+**Fix:**
+ <div class="example-container">
+ <div class="example">
+ <div class="example-inner">
+ <div class="example-title">Before</div>
+```c
+key <AE01> { [ 0x1001ed0] };
+```
+</div>
+ </div>
+ <div class="example">
+ <div class="example-inner">
+ <div class="example-title">After</div>
+```c
+// Preferred form: human-friendly
+key <AE01> { [ Ocircumflexacute ] };
+// or
+key <AE01> { [ U1ED0 ] };
+```
+</div>
+ </div>
+ </div>
+</details>
+
### XKB-516 – Extra symbols ignored {#XKB-516}
<dl>
[XKB-305]: @ref XKB-305
[XKB-312]: @ref XKB-312
[XKB-461]: @ref XKB-461
+[XKB-489]: @ref XKB-489
[XKB-516]: @ref XKB-516
[XKB-578]: @ref XKB-578
[XKB-645]: @ref XKB-645
added: ALWAYS
type: warning
description: "Warn if there are conflicting keysyms while merging keys"
+- id: "numeric-keysym"
+ code: 489
+ added: 1.6.0
+ type: warning
+ description: "Warn on numeric keysym (other than 0-9)"
+ details: |
+ Numeric keysyms are not human-friendly. Use the corresponding named keysym
+ or Unicode keysym, if available.
+ examples:
+ - name: Hexadecimal keysym `0x1001ed0`
+ description: |
+ **Error message:**
+
+ ```
+ xkbcommon: WARNING: [XKB-489] numeric keysym "0x1001ed0"
+ ```
+ before: |
+ ```c
+ key <AE01> { [ 0x1001ed0] };
+ ```
+ after: |
+ ```c
+ // Preferred form: human-friendly
+ key <AE01> { [ Ocircumflexacute ] };
+ // or
+ key <AE01> { [ U1ED0 ] };
+ ```
- id: "extra-symbols-ignored"
code: 516
added: ALWAYS
XKB_ERROR_UNSUPPORTED_SHIFT_LEVEL = 312,
/** Warn if there are conflicting keysyms while merging keys */
XKB_WARNING_CONFLICTING_KEY_SYMBOL = 461,
+ /** Warn on numeric keysym (other than 0-9) */
+ XKB_WARNING_NUMERIC_KEYSYM = 489,
/** TODO: add description */
XKB_WARNING_EXTRA_SYMBOLS_IGNORED = 516,
/** Warn when a field has not the expected type */
}
if (val <= XKB_KEYSYM_MAX) {
+ log_warn_with_code(ctx, XKB_WARNING_NUMERIC_KEYSYM,
+ "numeric keysym \"0x%x\" (%d)",
+ (unsigned int) val, val);
*sym_rtrn = (xkb_keysym_t) val;
return true;
}
);
$$ = XKB_KEY_NoSymbol;
}
+ parser_warn(
+ param, XKB_WARNING_NUMERIC_KEYSYM,
+ "numeric keysym \"0x%"PRIx64"\" (%"PRId64")",
+ $1, $1
+ );
}
}
;
{XKB_WARNING_NON_BASE_GROUP_NAME, "Non base group name"},
{XKB_ERROR_UNSUPPORTED_SHIFT_LEVEL, "Unsupported shift level"},
{XKB_WARNING_CONFLICTING_KEY_SYMBOL, "Conflicting key symbol"},
+ {XKB_WARNING_NUMERIC_KEYSYM, "Numeric keysym"},
{XKB_WARNING_EXTRA_SYMBOLS_IGNORED, "Extra symbols ignored"},
{XKB_ERROR_WRONG_FIELD_TYPE, "Wrong field type"},
{XKB_WARNING_UNKNOWN_CHAR_ESCAPE_SEQUENCE, "Unknown char escape sequence"},