libxkbcommon 1.11.0
Library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state
|
This page presents the differences between the XKB 1.0 specification implemented in current X servers and its implementation in libxkbcommon.
xkbcommon has removed support for some parts of the specification which introduced unnecessary complications. Many of these removals were in fact not implemented, or half-implemented at best, as well as being totally unused in the standard keyboard layout database, xkeyboard-config.
On the other hand, xkbcommon has notable additions that lift hard-coded limitation of the X11 Protocol.
Feature | X11 | xkbcommon (v1 format) | xkbcommon (v2 format) |
---|---|---|---|
Wayland support | ❌️ No supportWayland support requires the XWayland compatibility layer. | ✅ Full supportlibxkbcommon is the reference implementation of the keyboard keymap handling (parsing/serializing, state) for Wayland. | |
User configuration | ❌️ No supportLayout database path is hard-coded in xserver.
| ✅ Full supportMultiple layout database path can be used simultaneously, enabling user-space configuration. See User-configuration for further information. | |
Extended keycodes | ❌️ No supportLimited to 8-bit keycodes. | ✅ Full supportSupport all Linux keycodes using 32-bit keycodes. | |
Extended key names | ❌️ No supportLimited to 4-character names. | ✅ Full supportSupport any key names of any length. | |
Extended number of layouts | ❌️ No supportLimited to 4 layouts. | ❌️ No supportLimited to 4 layouts. | ✅ Full support (since 1.11)Enable up to 32 layouts when using |
Unified modifiers | ❌️ No supportClear separation between real (i.e. core) and virtual modifiers. | ✅ Full supportReal and virtual modifiers have been collapsed into the same namespace, with a “significant” flag that largely parallels the core/virtual split. Real modifiers are predefined modifiers with fixed encoding and considered merely as a X11 compatibility feature. | |
Extended modifiers | ❌️ No supportLimited to up to 8 independent modifiers. | ✅ Full supportEnable up to 32 independent modifiers. | |
Canonical virtual modifiers | ❌️ No supportVirtual modifiers can only mapped to real modifiers (8 bits). | ⚠️ Partial supportOnly if using explicit mapping: e.g. | ✅ Full supportVirtual modifiers that are not mapped either explicitly (using e.g. |
Multiple keysyms per level | ❌️ Parsing onlyIgnored: fallback to | ✅ Full support
| |
Multiple actions per level | ❌️ No supportParse error. | ⚠️ Parsing & handling, no serializationCurrently limited to 1 action for each action type “group” and “modifier”.
| ⚠️ Partial supportCurrently limited to 1 action for each action type “group” and “modifier”.
|
Geometry | ✅ Full support | ⚠️ Parsing onlyRational:
| |
Radio groups | ✅ Full support | ❌️ No supportUnused in xkeyboard-config layouts. | |
Overlays | ✅ Full support | ❌️ No supportUnused in xkeyboard-config layouts. | |
Key behaviors | ✅ Full support | ❌️ No supportUsed to implement radio groups and overlays, and to deal with things like keys that physically lock; Unused in xkeyboard-config layouts. | |
Indicator behaviors | ✅ Full support | ⚠️ Partial supportE.g. LED-controls-key behavior (X11’s The only supported LED behavior is key-controls-LED. Unused in xkeyboard-config layouts. |
Type | Action | X11 | xkbcommon (v1 format) | xkbcommon (v2 format) |
---|---|---|---|---|
Ineffectual | NoAction() | ✅ Full support | ✅ Full support | |
VoidAction() | ❌️ No support | ⚠️ Parsing only (since 1.10) | ✅ Full support (since 1.11) | |
Modifiers | SetModifiers() | ⚠️ Partial support
| ⚠️ Partial support
| ✅ Full support
|
LatchModifiers() | ⚠️ Partial support
| ⚠️ Partial support
| ✅ Full support
| |
LockModifiers() | ⚠️ Partial support
| ⚠️ Partial support
| ✅ Full support
| |
Groups | SetGroup() | ✅ Full support | ✅ Full support | |
LatchGroup() | ✅ Full support | ✅ Full support | ||
LockGroup() | ⚠️ Partial support
| ⚠️ Partial support
| ✅ Full support
| |
Legacy action | MovePointer() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | |
PointerButton() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | ||
LockPointerButton() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | ||
SetPointerDefault() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | ||
SetControls() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | ||
LockControls() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | ||
TerminateServer() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | ||
SwitchScreen() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | ||
Private() | ✅ Full support | ⚠️ Parsing and serializing only, no API support | ||
Unsupported legacy action | RedirectKey() | ✅ Full support | ❌️ Parsing only | |
ISOLock() | ✅ Full support | ❌️ Parsing only | ||
DeviceButton() | ✅ Full support | ❌️ Parsing only | ||
LockDeviceButton() | ✅ Full support | ❌️ Parsing only | ||
DeviceValuator() | ✅ Full support | ❌️ Parsing only | ||
MessageAction() | ✅ Full support | ❌️ Parsing only |
Feature | X11 (xkbcomp) | xkbcommon (v1 format) | xkbcommon (v2 format) |
---|---|---|---|
Optional keymap components | ❌️ All components are mandatory | ✅ Full support (since 1.9)Keymap components are no longer mandatory, e.g. a keymap without a | |
Strong type check | ❌️ Weak type check | ⚠️ Stronger type check (WIP)Floating-point numbers cannot be used where an integer is expected. | |
replace merge mode in include statements | ❌️ No support | ✅ Full support (since 1.9)Supported using the prefix | |
Keysym as strings | ❌️ No support | ✅ Full support (since 1.9)Keysyms can be written as their corresponding string, e.g. | |
Unicode escape sequence | ❌️ No support | ||
Extended GroupN constants | ❌️ No supportOnly | ❌️ No supportOnly Use | ✅ Full support (since 1.11)The pattern |
Extended LevelN constants | ❌️ No supportOnly | ✅ Full support (since 1.11)Since 1.11, the pattern Before 1.11, only | |
Extended include | ❌️ No support | ✅ Full support (since 1.11)Enable absolute paths and See keymap-include-percent-expansion for further details. | |
Include predefined maps | ✅ Full support | ❌️ No supportThe modern approach is to use RMLVO. | |
Exponent syntax for floating-point numbers | ✅ Full support | ❌️ No support
| |
alternate merge mode | ✅ Full support | ⚠️ Parsing, fallback to default merge mode
| |
Multiple group definition in symbols section | ✅ Full support |
Feature | X11 | xkbcommon (v1 format) | xkbcommon (v2 format) |
---|---|---|---|
Full Unicode support | ❌️ Incomplete | ✅ Full supportFull support of simple case mappings for | |
KcCGST | ✅ Full support | ⚠️ Partial support (since 1.10)
| |
XKM file format | ✅ Full support | ❌️ No supportObsolete legacy file format tied to X11 ecosystem. |
Feature | X11 | xkbcommon (v1 format) | xkbcommon (v2 format) |
---|---|---|---|
! include statement | ❌️ No support | ✅ Full supportSee rules include statement for further details. | |
replace merge mode | ❌️ No support | ✅ Full support (since 1.9)Support the merge mode replace via the prefix | |
Extended layout indices | ❌️ No support | ✅ Full support (since 1.8)
See extended layout indices for further details. | |
:all qualifier | ❌️ No support | ✅ Full support (since 1.8)the See :all qualifier for further details. | |
Extended wild cards | ❌️ No support | ✅ Full support (since 1.9)
See rules wildcards for further information. |
Feature | X11 | xkbcommon |
---|---|---|
XML format | ❌️ No support | ✅ Full support
|
Relative to the standard implementation in libX11 (described in the Compose(5) man-page):
Feature | X11 (libX11 ) | xkbcommon |
---|---|---|
[!] MODIFIER syntax | ✅ Full support | ⚠️ Parsing onlySyntax: If the modifier list is preceded by
|
Modifier keysyms in sequences | ✅ Full support | ⚠️ Parsed, but key events are ignoredModifiers should not be used in Compose sequences. Use keymap’s features or a keysym with more appropriate semantics. |
Interactions with Braille keysyms | ✅ Full support | ❌️ No support
|