|
| 1 | +libxkbcommon [1.11.0] – 2025-08-08 |
| 2 | +================================== |
| 3 | + |
| 4 | +The highlight of this release is the introduction of a new keymap text format, |
| 5 | +`::XKB_KEYMAP_FORMAT_TEXT_V2`, in order to fix decade-old issues inherited from |
| 6 | +the X11 ecosystem. See the API section for documentation of its use. |
| 7 | + |
| 8 | +[1.11.0]: https://github.com/xkbcommon/libxkbcommon/tree/xkbcommon-1.11.0 |
| 9 | + |
| 10 | +## Keymap text format |
| 11 | + |
| 12 | +### New |
| 13 | + |
| 14 | +A new keymap text format **v2** has been introduced as a superset of the legacy |
| 15 | +**v1** format. The format is not yet frozen and considered a living standard, |
| 16 | +although future iterations should be backward-compatible. See the |
| 17 | +[compatibility page] for detailed information of the features of each format. |
| 18 | + |
| 19 | +- Added the new parameter `lockOnRelease` for the key action `LockGroup()` |
| 20 | + ([#420](https://github.com/xkbcommon/libxkbcommon/issues/420)). |
| 21 | + |
| 22 | + It enables to use e.g. the combination `Alt + Shift` *alone* to |
| 23 | + switch layouts, while keeping the use of `Alt + Shift + other key` |
| 24 | + (typically for keyboard shortcuts). |
| 25 | + |
| 26 | + It enables to fix a [20-year old issue][xserver-258] inherited from the X11 |
| 27 | + ecosystem, by extending the [XKB protocol key actions]. |
| 28 | + |
| 29 | + As it is incompatible with X11, this feature is available only using |
| 30 | + `::XKB_KEYMAP_FORMAT_TEXT_V2`. |
| 31 | +- Added the new parameter `unlockOnPress` for the key modifier action `SetMods()`, |
| 32 | + `LatchMods()` and `LockMods()` |
| 33 | + ([#372](https://github.com/xkbcommon/libxkbcommon/issues/372) and |
| 34 | + [#780](https://github.com/xkbcommon/libxkbcommon/issues/780)). |
| 35 | + |
| 36 | + It enables e.g. to deactivate `CapsLock` *on press* rather than on release, |
| 37 | + as in other platforms such as Windows. |
| 38 | + |
| 39 | + It enables to fix the following two issues inherited from the X11 ecosystem, |
| 40 | + by extending the [XKB protocol key actions]<!---->: |
| 41 | + - a [18-year old issue][xkeyboard-config-74]; |
| 42 | + - a [12-year old issue][xserver-312]. |
| 43 | + |
| 44 | + As it is incompatible with X11, this feature is available only using |
| 45 | + `::XKB_KEYMAP_FORMAT_TEXT_V2`. |
| 46 | + |
| 47 | +- Added the new parameter `latchOnPress` for the key action `LatchMods()`. |
| 48 | + |
| 49 | + Some keyboard layouts use `ISO_Level3_Latch` or `ISO_Level5_Latch` to define |
| 50 | + “built-in” dead keys. `latchOnPress` enables to behave as usual dead keys, i.e. |
| 51 | + to latch on press and to deactivate as soon as another (non-modifier) key is |
| 52 | + pressed. |
| 53 | + |
| 54 | + As it is incompatible with X11, this feature is available only using |
| 55 | + `::XKB_KEYMAP_FORMAT_TEXT_V2`. |
| 56 | +- Raised the layout count limit from 4 to 32. Requires using |
| 57 | + `::XKB_KEYMAP_FORMAT_TEXT_V2`. |
| 58 | + ([#37](https://github.com/xkbcommon/libxkbcommon/issues/37)) |
| 59 | + |
| 60 | + It enables to fix a [16-year old issue][xserver-262] inherited from the X11 |
| 61 | + ecosystem. |
| 62 | +- Virtual modifiers are now mapped to their <em>[canonical encoding]</em> if they |
| 63 | + are not mapped *explicitly* (`virtual_modifiers M = …`) nor *implicitly* |
| 64 | + (using `modifier_map`/`virtualModifier`). |
| 65 | + |
| 66 | + This feature is enabled only when using `::XKB_KEYMAP_FORMAT_TEXT_V2`, as it may |
| 67 | + result in encodings not compatible with X11. |
| 68 | + |
| 69 | +- Added support for the constants `Level<INDEX>` for *any* valid level index, |
| 70 | + instead of the previous limited range `Level1`..`Level8`. |
| 71 | +- Enable to use absolute paths and `%`-expansion variables for including |
| 72 | + *keymap components*, in the same fashion than the *rules* files. |
| 73 | + |
| 74 | +[compatibility page]: https://xkbcommon.org/doc/current/xkbcommon-compatibility.html |
| 75 | +[XKB protocol key actions]: https://www.x.org/releases/current/doc/kbproto/xkbproto.html#Key_Actions |
| 76 | +[xkeyboard-config-74]: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/74 |
| 77 | +[xserver-258]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/258 |
| 78 | +[xserver-262]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/262 |
| 79 | +[xserver-312]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/312 |
| 80 | +[canonical encoding]: https://xkbcommon.org/doc/current/keymap-text-format-v1-v2.html#canonical-and-non-canonical-modifiers |
| 81 | + |
| 82 | + |
| 83 | +## Rules text format |
| 84 | + |
| 85 | +### New |
| 86 | + |
| 87 | +- Added support for *layout-specific options*. It enables specifying a |
| 88 | + layout index for each option by appending `!` + 1-indexed layout, so that it |
| 89 | + applies only if the layout matches. |
| 90 | + ([#500](https://github.com/xkbcommon/libxkbcommon/issues/500)) |
| 91 | + |
| 92 | + |
| 93 | +## API |
| 94 | + |
| 95 | +### Breaking changes |
| 96 | + |
| 97 | +- `xkb_keymap_new_from_names()` now uses the new keymap format |
| 98 | + `::XKB_KEYMAP_FORMAT_TEXT_V2`. |
| 99 | +- When using `::XKB_KEYMAP_FORMAT_TEXT_V1`, multiple actions per level are now |
| 100 | + serialized using `VoidAction()`, in order to maintain compatibility with X11. |
| 101 | + ([#793](https://github.com/xkbcommon/libxkbcommon/issues/793)) |
| 102 | + |
| 103 | +### Deprecated |
| 104 | + |
| 105 | +- `xkb_keymap_new_from_names()` is now deprecated; please use |
| 106 | + `xkb_keymap_new_from_names2()` instead with an explicit keymap format. |
| 107 | + |
| 108 | +### New |
| 109 | + |
| 110 | +- Added the new keymap format `::XKB_KEYMAP_FORMAT_TEXT_V2`, which enables |
| 111 | + libxkbcommon’s extensions incompatible with X11. |
| 112 | + |
| 113 | + Note that *fallback* mechanisms ensure that it is possible to parse using one |
| 114 | + format and serialize using another. |
| 115 | + |
| 116 | + **Wayland compositors** may use the new format to *parse* keymaps, but they |
| 117 | + *must* use the previous format `::XKB_KEYMAP_FORMAT_TEXT_V1` whenever |
| 118 | + *serializing* for interchange. Since almost features available only in the v2 |
| 119 | + format deal with state handling which is managed in the server, clients should |
| 120 | + not be affected by a v2-to-v1 conversion. |
| 121 | + |
| 122 | + **Client applications** should use the previous `::XKB_KEYMAP_FORMAT_TEXT_V1` |
| 123 | + to parse keymaps, at least for now. They may use `::XKB_KEYMAP_FORMAT_TEXT_V2` |
| 124 | + only if used with a Wayland compositor using the same version of libxkbcommon |
| 125 | + *and* serializing to the new format. This precaution will be necessary until |
| 126 | + the new format is stabilized. |
| 127 | +- Added `xkb_keymap_new_from_names2()` as an alternative to `xkb_keymap_new_from_names()`, |
| 128 | + which is deprecated. |
| 129 | +- Added `xkb_keymap_new_from_rmlvo()` to compile a keymap using the new RMLVO |
| 130 | + builder API. |
| 131 | +- Added a API to safely build a RMLVO configuration: |
| 132 | + - `xkb_rmlvo_builder_new()` |
| 133 | + - `xkb_rmlvo_builder_append_layout()` |
| 134 | + - `xkb_rmlvo_builder_append_option()` |
| 135 | + - `xkb_rmlvo_builder_ref()` |
| 136 | + - `xkb_rmlvo_builder_unref()` |
| 137 | +- Added `xkb_keymap_mod_get_mask2()` to query the mapping of a modifier by its |
| 138 | + index rather than it name. |
| 139 | +- Update keysyms using latest [xorgproto] |
| 140 | + \(commit: `ce7786ebb90f70897f8038d02ae187ab22766ab2`). |
| 141 | + |
| 142 | + Additions ([xorgproto-93]): |
| 143 | + |
| 144 | + - `XKB_KEY_XF86MediaSelectCD` (alias for `XKB_KEY_XF86CD`) |
| 145 | + - `XKB_KEY_XF86OK` |
| 146 | + - `XKB_KEY_XF86GoTo` |
| 147 | + - `XKB_KEY_XF86VendorLogo` |
| 148 | + - `XKB_KEY_XF86MediaSelectProgramGuide` |
| 149 | + - `XKB_KEY_XF86MediaSelectHome` |
| 150 | + - `XKB_KEY_XF86MediaLanguageMenu` |
| 151 | + - `XKB_KEY_XF86MediaTitleMenu` |
| 152 | + - `XKB_KEY_XF86AudioChannelMode` |
| 153 | + - `XKB_KEY_XF86MediaSelectPC` |
| 154 | + - `XKB_KEY_XF86MediaSelectTV` |
| 155 | + - `XKB_KEY_XF86MediaSelectCable` |
| 156 | + - `XKB_KEY_XF86MediaSelectVCR` |
| 157 | + - `XKB_KEY_XF86MediaSelectVCRPlus` |
| 158 | + - `XKB_KEY_XF86MediaSelectSatellite` |
| 159 | + - `XKB_KEY_XF86MediaSelectTape` |
| 160 | + - `XKB_KEY_XF86MediaSelectRadio` |
| 161 | + - `XKB_KEY_XF86MediaSelectTuner` |
| 162 | + - `XKB_KEY_XF86MediaPlayer` |
| 163 | + - `XKB_KEY_XF86MediaSelectTeletext` |
| 164 | + - `XKB_KEY_XF86MediaSelectDVD` (alias for `XKB_KEY_XF86DVD`) |
| 165 | + - `XKB_KEY_XF86MediaSelectAuxiliary` |
| 166 | + - `XKB_KEY_XF86MediaPlaySlow` |
| 167 | + - `XKB_KEY_XF86NumberEntryMode` |
| 168 | + |
| 169 | + [xorgproto-93]: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/93 |
| 170 | +- Registry: added `rxkb_option_is_layout_specific()` to query if an option accepts |
| 171 | + layout index specifiers to restrict its application to the corresponding layouts. |
| 172 | + ([#500](https://github.com/xkbcommon/libxkbcommon/issues/500)) |
| 173 | + |
| 174 | +### Fixes |
| 175 | + |
| 176 | +- Fixed incorrect implementation of `latchToLock` for `LatchMods()`, which could |
| 177 | + result in unintended `CapsLock` unlock. |
| 178 | + ([#808](https://github.com/xkbcommon/libxkbcommon/issues/808)) |
| 179 | +- Fixed `xkb_utf32_to_keysym()` returning deprecated keysyms for some |
| 180 | + Unicode code points. |
| 181 | +- Fixed breaking a latch not honoring `clearLocks=no`. |
| 182 | + |
| 183 | + |
| 184 | +## Tools |
| 185 | + |
| 186 | +### Breaking changes |
| 187 | + |
| 188 | +- The tools now use: |
| 189 | + |
| 190 | + - `::XKB_KEYMAP_FORMAT_TEXT_V2` as a default *input* format. |
| 191 | + - `::XKB_KEYMAP_USE_ORIGINAL_FORMAT` as a default *output* format. |
| 192 | + So if the input format is not specified, it will resolve to |
| 193 | + `::XKB_KEYMAP_FORMAT_TEXT_V2`. |
| 194 | + |
| 195 | + The formats can be explicitly specified using the new `--*format` options. |
| 196 | + |
| 197 | +### New |
| 198 | + |
| 199 | +- Added `--*format` options to various tools for specifying and explicit keymap |
| 200 | + format for parsing and serializing. |
| 201 | +- Added commands that automatically select the appropriate backend: |
| 202 | + - `xkbcli interactive`: try Wayland, X11 then fallback to the evdev backend. |
| 203 | + - `xkbcli dump-keymap`: try Wayland then fallback to the X11 backend. |
| 204 | +- Improved `xkbcli interactive-*`: |
| 205 | + - Print key release events. |
| 206 | + - Print detailed state change events. |
| 207 | + - Added `--uniline` to enable uniline event output (default). |
| 208 | + - Added `--multiline` to enable multiline event output, which provides |
| 209 | + more details than the uniline mode. |
| 210 | + - Wayland and X11: Added `--local-state` to enable handling the keyboard state |
| 211 | + with a local state machine instead of the display server. |
| 212 | + ([#832](https://github.com/xkbcommon/libxkbcommon/issues/832)) |
| 213 | + - Wayland and X11: Added `--keymap` to enable to use a custom keymap instead |
| 214 | + of the keymap from the display server. Implies `--local-state`. |
| 215 | + ([#833](https://github.com/xkbcommon/libxkbcommon/issues/833)) |
| 216 | +- `xkbcli how-to-type`: Added `--keymap` to enable loading the keymap from a |
| 217 | + file or stdin instead of resolving RMLVO names. |
| 218 | +- `xkbcli how-to-type`: Added Compose support, enabled by default and disabled |
| 219 | + using `--disable-compose`. |
| 220 | + ([#361](https://github.com/xkbcommon/libxkbcommon/issues/361)) |
| 221 | +- `xkbcli-list`: Added `layout-specific` field for options. |
| 222 | + ([#500](https://github.com/xkbcommon/libxkbcommon/issues/500)) |
| 223 | +- Added `--verbose` to various tools, so that all tools have the option. |
| 224 | + ([#833](https://github.com/xkbcommon/libxkbcommon/issues/833)) |
| 225 | + |
| 226 | + |
| 227 | + |
1 | 228 | libxkbcommon [1.10.0] – 2025-05-21
|
2 | 229 | ==================================
|
3 | 230 |
|
|
0 commit comments