Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| a5bdb954 | 2025-01-24 20:08:01 | tools: Fix signed literal used as a mask | ||
| 4ac22263 | 2025-01-16 23:22:40 | keysyms: Check clashes between keysyms names and keywords Due to how our parser is implemented, keysyms names that are also valid keywords require special handling. Added a check for these clashes in the keysym generator. The only current clash, `section`, is already handled. Note that it means that e.g. `section`, `Section` and `sEcTiOn` all parse to the same keysym. This side effect is fine here, because *currently* there is no other keysym that clashes with any possible of the case variation of `section`. But in order to be extra cautious, we now test thoses clashes too. Hopefully we will never have a clash again, but while it is unlikely that we modify the keywords, the keysyms are not a frozen set. | ||
| 818b1b6b | 2025-01-22 17:19:41 | symbols: Simplify GetGroupIndex call | ||
| 357ab0cb | 2025-01-23 16:42:30 | clang-tidy: Fix missing default case in switch statement | ||
| 842497d9 | 2025-01-22 16:46:11 | clang-tidy: Fix implicit or incorrect integer casts | ||
| a2c9b6b4 | 2025-01-22 16:57:54 | x11: Make assumption explicit | ||
| 5389a31e | 2025-01-22 17:33:03 | clang-tidy: Use memcpy instead of the insecure strcpy | ||
| b76617e6 | 2025-01-22 16:42:47 | clang-tidy: Various fixes related to IO | ||
| 7c124fd9 | 2025-01-22 17:20:04 | rules: Fix incrementing a variable in a complex condition | ||
| fc3c8cfd | 2025-01-22 16:56:45 | Replace STATIC_INSERT with official C11 static_assert | ||
| 53b3f446 | 2025-01-22 17:43:53 | clang-tidy: Fix headers includes | ||
| 0c940827 | 2025-01-22 16:39:35 | clang-tidy: Macro arguments should be enclosed in parentheses | ||
| 3ee08251 | 2025-01-22 16:50:19 | clang-tidy: Fix possible leak | ||
| c6b29f9f | 2025-01-22 16:17:38 | Add .clang-tidy | ||
| b1e1aae6 | 2025-01-23 15:20:44 | xkbcomp: Fix memory leak when extra content after keymap It triggers with e.g.: ``` xkb_keymap { xkb_keycodes { }; }; }; // erroneous ``` | ||
| 709027ec | 2025-01-23 09:12:15 | symbols: Fix inconsistent error handling Currently the following keymap triggers a critical error (invalid `vmods`) only for the second key statement, while it should handle both equally. ``` xkb_keymap { xkb_keycodes { <> = 9; }; xkb_types { }; xkb_compat { }; xkb_symbols { key <> { vmods = [], repeats = false }; key <> { repeats = false, vmods = [] }; }; }; ``` Fixed by parsing the whole symbols body and failing if any error was found. | ||
| ec2915fe | 2025-01-22 17:18:21 | symbols: Fix a possible null pointer deference Introduce a new Expression type, `EXPR_EMPTY_LIST`, to avoid the ambiguity between action and keysym empty lists. Two alternatives were rejected to keep the semantics clear: - Using `EXPR_KEYSYM_LIST`: because we would end up accepting an empty keysym list while processing actions. - Using NULL: convey no info and is hazardous. | ||
| 88a3d3c2 | 2025-01-23 16:03:51 | tests: Refactor buffercomp Move tests into proper functions and log tests names. | ||
| 9b7466cf | 2025-01-21 16:02:55 | atom: Fix missing return value in atom_intern Ensure all control paths return a value. | ||
| 425dc634 | 2025-01-21 15:40:33 | Fix some implicit integers casts | ||
| 9ef45dc5 | 2025-01-21 19:55:47 | Fix incompatible pointer types with enums The enum casts can possibly lead to unaligned access. The warnings trigger in the Windows CI but not on Linux. One may use `-fshort-enums` with gcc in order to trigger the errors. | ||
| b1aecd47 | 2025-01-21 17:51:56 | actions: Fix SwitchScreen screen value range Currently we accept values of -255..255 while parsing the screen value of `SwitchScreen` actions`, but then we silently cast it against `int8_t`, i.e. in range -128..127. We actually do as xkbcomp, but this seems a bug because the target storage is a `char`. Let’s simply raise a parse error if the value does not fit in our type. | ||
| 4b0209df | 2025-01-21 07:26:33 | bench: Fix embedded directive within macro arguments Embedding a directive within macro arguments has undefined behavior. | ||
| e74e9cbc | 2025-01-21 10:53:18 | meson: change warning level 2 -> 3 Who doesn't like more warnings? :) In gcc/clang, 3 adds -Wpedantic, which sucks, so we turn it off. So no difference there. On msvc, it turns on "level 4 informational warnings that aren't off by default" and is recommended[0]. [0] https://learn.microsoft.com/en-us/cpp/build/reference/compiler-option-warning-level Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| 2f0bc3e0 | 2025-01-21 10:51:45 | meson: show compiler id in summary Useful for seeing whether the compiler is gcc, clang, etc. Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| 38557e5b | 2025-01-21 10:49:06 | meson: remove explicit `b_lundef=true` It is already the default. Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| 26069b76 | 2025-01-21 10:48:28 | xkbcomp/parser: silence a set but unused warning ``` libxkbcommon.so.0.7.0.p/parser.c:1632:9: warning: variable '_xkbcommon_nerrs' set but not used [-Wunused-but-set-variable] 1632 | int yynerrs = 0; ``` Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| 8c071403 | 2025-01-21 10:40:03 | test/keysym: fix comparison of integers of different signs ``` ../test/keysym.c:320:9: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] 320 | U16_APPEND(cp_string, offset, ARRAY_SIZE(cp_string), cp, isError); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/unicode/utf16.h:396:47: note: expanded from macro 'U16_APPEND' 396 | } else if((uint32_t)(c)<=0x10ffff && (i)+1<(capacity)) { \ | ~~~~~^ ~~~~~~~~ ``` Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| 91e58f0e | 2025-01-21 10:38:35 | test/registry: remove unused function Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| 2a60432e | 2025-01-21 10:25:55 | test/xvfb-wrapper: remove unused code Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| db5e6d30 | 2025-01-21 11:35:57 | registry: Refactor to avoid hazardous casts Inline `rxkb_object_unref` for each type and remove the `destroy` field. | ||
| c0762c49 | 2025-01-20 16:33:50 | keymap: Fix buffer unnecessary written twice When dumping the keymap, we first try to write to the buffer and get the min size requirement. Then we reallocate if necessary. However, we should not write it again if we got enough space previously! | ||
| ddb731ce | 2025-01-20 18:01:08 | bench: Add xkb_keymap_get_as_string Based on the `compile-keymap` benchmark. | ||
| 24fe4bac | 2025-01-20 16:31:44 | Fix undefined behaviours with NULL pointer Issues detected by the sanitizers: - fix indexing NULL pointer - fix zero offset to NULL pointer | ||
| 454b18f5 | 2025-01-20 14:04:49 | ci: Enable sanitizers for Linux Since `asan` and `ubsan` overlap Valgrind, we run separate pipelines for each. Enable only for gcc for now, as we could not make it work with clang. | ||
| 8d0df44a | 2025-01-15 19:11:58 | text: Ensure mod mask can always be printed entirely | ||
| b0d9a790 | 2025-01-15 12:03:10 | vmods: Fix explicit vmods not dumped | ||
| 11140ded | 2025-01-10 13:58:39 | Use test map for checking --version-script, instead of full map Various problems can occur when using the full `xkbcommon.map` file when checking whether the `--version-script` linker option works in `meson.build`. For instance, newer linkers typically complain about non-existing symbols, so in commit ebe4157 `--undefined-version` was added to work around that. But then in commit 1d8a25d6 another workaround needed to be added for older linkers. It is better to use a minimalistic linker script for testing instead. The other workarounds can then be removed. | ||
| c7fdf506 | 2025-01-16 20:23:28 | Use portable integer literal suffixes | ||
| e3e44998 | 2025-01-16 20:23:47 | Fix missing or incorrect integer literal suffixes The correct suffix is required in order to have the expected value in a portable way. | ||
| 3fdd822d | 2025-01-16 02:21:29 | state: Fix mods not being independently cleared (#584) The modifiers filters should ensure minimal interaction between them, but currently the Latch mod filters are overzealous and mess with the mods from other filters set to be cleared, resulting in some modifiers permanently set. Fixed by clearing mods properly with `OR` rather than direct setting of `state::clear_mods`. While we are at it, `state::set_mods` should be `OR`ed as well. This should not have any impact for now, but this is more future-proof. Fixes #583 Co-authored-by: Jules Bertholet <julesbertholet@quoi.xyz> Co-authored-by: Pierre Le Marre <dev@wismill.eu> | ||
| dfa286b2 | 2025-01-15 13:56:36 | compat: Fix Interp & LED merge modes | ||
| d43bb955 | 2024-12-19 18:21:01 | symbols: Fix key symbols/actions merge - Fixed field for defined keysyms/actions - Fixed regression introduced by fdf2c525977e7e8af4135d593110f5bc1454abd8 | ||
| 7036e46c | 2025-01-13 15:20:47 | symbols: Add tests for key merge modes (keysyms/actions) This commit adds tests for merging various key configurations: - With/without keysyms/actions - Single/multiple keysyms/actions per level We test all the merge modes for including a map (global) as well as directly on the keys (local): - default (global: include, local: implicit) - augment - override - replace The tests data are generated with: - A Python script `scripts/update-merge-modes-tests.py` for keycodes and symbols data. Use `--debug` for extra comments to help debugging. The script can optionally generate C headers for alternative key sequence tests, that were used before implementing golden tests. The latter tests are not used anymore (duplicate with golden tests) but their generator is kept for now, as they can still be useful for debugging or writing similar tests. - The `merge-modes` test generates its own keymap files for golden tests, using: `build/test-merge-modes update`. It can also replace them with the obtained output rather than the expected one using `build/test-merge-modes update-obtained`, which is very useful for debugging. | ||
| 6c6dbf32 | 2025-01-07 11:19:30 | state: Fix LatchGroup action with latchToLock disabled A `LatchGroup` action with the `latchToLock`` option disabled can apply its latch effect multiple times. | ||
| 325ba10e | 2025-01-07 16:27:50 | state: Fix LEDs driven by the group state When the indicator field `whichGroupState` is set to `Base` or `Latched`, the group masks should be considered only as boolean values as per the XKB specification. | ||
| 7d08bf43 | 2025-01-07 18:33:21 | state: Add test for LEDs driven by the group state | ||
| 93b75c63 | 2024-12-22 17:49:24 | x11: Keep level when the keysym is undefined but not the action When getting the keymap from X11, the following: ``` key <AD01> { actions=[SetGroup(2)] }; ``` is currently converted to: ``` key <AD01> { }; ``` This commit fixes dropping a defined action when the keysym is undefined | ||
| d523fd56 | 2025-01-11 08:53:22 | test: Do not include extra numpad in the base one This allow to load only the minimal key types required by the protocol: `basic+numpad`. | ||
| 0dc39650 | 2025-01-02 18:45:15 | test: Declare virtual modifiers explicitly This is required in order to use the sections in isolation. | ||
| b6acdc30 | 2025-01-10 20:31:04 | xkbcli list: Fix duplicate variants | ||
| d706e649 | 2025-01-10 14:18:21 | scripts: Fix formatting with Ruff 0.9 See: https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md#090 | ||
| d2eb8601 | 2025-01-07 08:00:06 | doc: Mark $HOME/.xkb/ as a deprecated location for user configuration `$HOME/.xkb` was supported before the addition of the XDG directories. Removal of the functionality is just going to cause potential breakage for now good technical reason. See https://specifications.freedesktop.org/basedir-spec/latest/ for further details. | ||
| 16eff222 | 2024-12-31 08:01:52 | doc: Add debugging page and warning about session restart Co-authored-by: Pierre Le Marre <dev@wismill.eu> Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net> | ||
| bf03b4b5 | 2024-12-19 16:23:05 | symbols: Parse empty key The following syntax does not parse in xkbcommon, but it does in xkbcomp: ``` xkb_symbols "x" { key <AD01> { }; }; ``` While the usefulness of such statement is debatable, the fact that it does parse in xkbcomp and that tools may generate such keymap entry make it relevant to handle. | ||
| 09ae46dd | 2024-12-15 13:38:12 | Add "How to make a libxkbcommon release" Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| 593a1613 | 2024-12-15 16:30:20 | ci: upload only doxygen docs to pages We use the xkbcommon/website pages for the website, so here it's just for previewing and we only need to the docs, not the website. Fix #561. Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| b9b4ab47 | 2024-12-09 09:21:01 | keysyms: Add sharp S upper case mapping exception The case mapping `ssharp` ß ↔ `U1E9E` ẞ was added in 13b30f4f0dccc08dfea426d73570b913596ed602 but was broken: - For the lower case mapping it returned the keysym `0x10000df`, which is an invalid Unicode keysym. - For the upper case mapping it returned the upper Unicode code point rather than the corresponding keysym. It did accidentally enable the detection of alphabetic key type for the pair (ß, ẞ) though. However this detection was accidentally removed in 5c7c79970a2800b6248e829464676e1f09c5f43d (v1.7) with an attempt to fix the wrong keysym case mapping. Finally both the *lower* case mapping and the key type detection were fixed for good when we implemented the complete Unicode simple case mappings and corresponding tests in e83d08ddbc9851944c662c18e86d4eb0eff23e68. However, the *upper* case mapping `ssharp` → `U1E9E` remained disabled. Indeed, ẞ is a relatively recent addition to Unicode (2008) and had no official recommendation, until recently. So while the lower mapping ẞ→ß exists in Unicode, its converse upper mapping does not. Yet since 2017 the Council for German Orthography (Rat für deutsche Rechtschreibung) recommends[^1] ẞ as the capitalization of ß. Due to its stability policies, the Unicode Character Database (UCD) that we use to generate our keysym case mappings (via ICU) cannot update the simple case mapping of ß. Discussions are currently ongoing in the Unicode mailing list[^2] and CLDR[^3] about how to deal with the new recommended case mapping. However, the discussions are oriented on text-processing and compatibility mappings, while libxkbcommon is on a rather lower level. It seems that the slow adoption of ẞ is partly due to the difficulty to type it. Since ẞ is used only for ALL CAPS casing, the expectation is to type it using CapsLock. While our detection of alphabetic key types works well[^4] for the pair (ß,ẞ), the *internal capitalization* currently does not work and is fixed by this commit. Added the ß → ẞ upper mapping: - Added an exception in the generation script - Fixed tests - Added documentation of the exceptions in `xkbcommon.h` - Added/updated log entries [^1]: https://www.rechtschreibrat.com/regeln-und-woerterverzeichnis/ [^2]: https://corp.unicode.org/pipermail/unicode/2024-November/011162.html [^3]: https://unicode-org.atlassian.net/browse/CLDR-17624 [^4]: Except libxkbcommon 1.7, see the second paragraph. | ||
| 0ebdc4db | 2024-12-15 12:09:53 | ci: fix upload artifact conflict Doesn't like it when two jobs from the same run upload the same name. Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| c79c6512 | 2024-12-15 09:58:39 | build(deps): bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> | ||
| e4092d1f | 2024-12-15 09:53:41 | build(deps): bump actions/upload-pages-artifact from 1 to 3 Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 1 to 3. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](https://github.com/actions/upload-pages-artifact/compare/v1...v3) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> | ||
| 8985cc31 | 2024-12-15 09:53:37 | build(deps): bump dawidd6/action-download-artifact from 6 to 7 Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 6 to 7. - [Release notes](https://github.com/dawidd6/action-download-artifact/releases) - [Commits](https://github.com/dawidd6/action-download-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: dawidd6/action-download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> | ||
| 16a346a1 | 2024-12-15 09:53:35 | build(deps): bump actions/configure-pages from 3 to 5 Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 3 to 5. - [Release notes](https://github.com/actions/configure-pages/releases) - [Commits](https://github.com/actions/configure-pages/compare/v3...v5) --- updated-dependencies: - dependency-name: actions/configure-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> | ||
| fda76884 | 2024-12-15 09:53:33 | build(deps): bump actions/deploy-pages from 2 to 4 Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 2 to 4. - [Release notes](https://github.com/actions/deploy-pages/releases) - [Commits](https://github.com/actions/deploy-pages/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/deploy-pages dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> | ||
| 807f11b7 | 2024-12-15 11:49:40 | Add dependabot configuration to keep github actions up to date Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| e0130e30 | 2024-11-18 20:08:56 | state: Add vmod support for xkb_state_mod_mask_remove_consumed | ||
| 5fbc0ec7 | 2024-10-14 16:05:52 | state: Support querying whether virtual mods are consumed Previously it was not possible to query the status of virtual modifiers with the following functions: - `xkb_state_mod_index_is_consumed` - `xkb_state_mod_index_is_consumed2` Note that it may *overmatch* if some modifier mappings overlap. For example, the default “us” PC layout maps both “Alt” and “Meta” to the real modifier “Mod1”; thus “Mod1”, “Alt” and “Meta” modifiers will return the same result with these functions. | ||
| 31a841ae | 2024-10-14 16:05:35 | state: support querying whether virtual modifiers are active Previously it was not possible to query the status of virtual modifiers with the following functions: - `xkb_state_mod_index_is_active` - `xkb_state_mod_indices_are_active` - `xkb_state_mod_name_is_active` - `xkb_state_mod_names_are_active` Note that it may *overmatch* if some modifier mappings overlap. For example, the default “us” PC layout maps both “Alt” and “Meta” to the real modifier “Mod1”; thus “Mod1”, “Alt” and “Meta” modifiers will return the same result with these functions. | ||
| 2ba9daf1 | 2024-09-23 16:20:37 | mods: Add more built-in names Added support for the following virtual modifiers: - `Alt` - `Meta` - `NumLock` - `Super` - `Hyper` - `LevelThree` - `LevelFive` - `ScrollLock` | ||
| 086a286a | 2024-09-23 16:20:17 | mods: Always use constants from xkbcommon-names.h Respect the claim that real modifiers names are built-in: - Add `XKB_MOD_NAME_MOD[1-5]` constants. - Replace modifiers names with their corresponding constants. | ||
| 43b26bd7 | 2024-11-29 08:51:41 | keysyms: Update to Unicode 16.0 | ||
| 420123fd | 2024-11-29 07:34:07 | export-keysyms: Enable all keysyms export + char names This enable to check case mappings for Unicode keysyms. | ||
| c085874e | 2024-11-25 15:45:14 | build(deps): bump dawidd6/action-download-artifact in /.github/workflows Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 2 to 6. - [Release notes](https://github.com/dawidd6/action-download-artifact/releases) - [Commits](https://github.com/dawidd6/action-download-artifact/compare/v2...v6) --- updated-dependencies: - dependency-name: dawidd6/action-download-artifact dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> | ||
| 6153fece | 2024-11-25 10:49:14 | changelog: Fix release title format Towncrier doc states that the `underlines` setting is not used with Markdown files, so let’s apply the tag ourselves. | ||
| b1b9ff61 | 2024-11-23 10:07:24 | compose/paths: fix `false` <-> `NULL` confusion, errors on C23 i don't have access to github but this patch enabled me to compile libxkbcommon with -std=gnu23 otherwise the following compilation error will result : ../src/compose/paths.c:70:16: error: incompatible types when returning type ‘_Bool’ but ‘char *’ was expected ( gcc (GCC) 15.0.0 20240509 (experimental) ) Signed-off-by: Ran Benita <ran@unusedvar.com> | ||
| 15da5ee8 | 2024-11-14 19:27:22 | Improve xkeyboard-config test script - Refactored to write files within the workers, else we have only one worker writing, slowly consuming the result queue. In some scenarios it may even result in out-of-memory as the resulting keymaps piles up. - Added the option `--compress` to allow compressing keymaps files with gunzip. - Use the recently added `--test` option for `xkbcli-compile-keymap` when we only want to test compilation, not the resulting keymap file. This speeds up the test suite of `xkeyboard-config`. | ||
| 628242b2 | 2024-11-14 18:09:03 | tools: Add --test to compile-{keymap,compose} The new flag `--test` enables to only test if compilation succeeds, without printing the corresponding keymap or Compose file. This is useful for quick feedback and to speedup some tests suites, e.g. for `xkeyboard-config`. | ||
| a7b84be9 | 2024-11-03 23:39:02 | Fix types annotations of Python scripts | ||
| a8afe6fc | 2024-10-30 14:01:12 | tests: Improve xkeyboard-config script - Refactor to more modern Python - Allow iterating over models too - Add filter for models and options - Add “short output” option - Fix layout variant - Use models subfolders for keymaps - Allow to load multiple registries simultaneously | ||
| bfddd9a8 | 2024-10-30 14:00:52 | Add typing annotations to Python scripts | ||
| cd029431 | 2024-10-13 19:52:15 | registry: Set libxml2 context options | ||
| 5f1b06b7 | 2024-10-13 19:51:45 | registry: Start using libxml2 contextual API Contextual functions are safer because they do not rely on a global state. | ||
| a47961b1 | 2024-10-12 16:43:46 | registry: Restore default libxml2 error handler after parsing Leaving the custom error handler could have resulted in a crash after the context has been freed. Closes: https://github.com/xkbcommon/libxkbcommon/issues/529 | ||
| b8888345 | 2024-09-20 09:17:23 | tools: Add xkbcli dump-keymap-{wayland,x11} There is currently no easy way to dump a keymap from a Wayland compositor, such as `xkbcomp -xkb $DISPLAY -` could do for X servers. As `xkbcomp` may not be intuitive, a corresponding tool for X servers would also be useful. Add the tools `xkbcli-dump-keymap-{wayland,x11}` by tweaking the existing `xkbcli-interactive-{wayland,x11}` tools. | ||
| 71d64df3 | 2024-10-08 18:45:18 | symbols: Add tests for multiple actions per level | ||
| b1da948a | 2024-10-08 19:43:18 | symbols: Add doc for multiple actions | ||
| 60228356 | 2024-10-07 10:42:27 | symbols: Add message ID for incompatible keysyms and actions counts | ||
| fdf2c525 | 2024-10-08 19:43:30 | actions: Add support for multiple actions per level This makes 1 keysym == 1 action holds also for multiple keysyms per level. The motivation of this new feature are: - Make multiple keysyms per level more intuitive. - Explore how to fix the issue with shortcuts in multi-layout settings (see the xkeyboard-config issue[^1]). The idea is to use e.g.: ```c key <LCTL> { symbols[1] = [ {Control_L, ISO_First_Group } ], actions[1] = [ {SetMods(modifiers=Control), SetGroup(group=-4) } ] }; ``` in order to switch temporarily to a reference layout in order to get the same shortcuts on every layout. When no action is specified, `interpret` statements are used to find an action corresponding for *each* keysym, as expected. For an interpretation matching Any keysym, we may get the same interpretation for multiple keysyms. This may result in unwanted duplicate actions. So set this interpretation only if no previous keysym was matched with this interpret at this level, else set the default interpretation. For now, at most one action of each following categories is allowed per level: - modifier actions: `SetMods`, `LatchMods`, `LockMods`; - group actions: `SetGroup`, `LatchGroup`, `LockGroup`. Some examples: - `SetMods` + `SetGroup`: ok - `SetMods` + `SetMods`: error - `SetMods` + `LockMods`: error - `SetMods` + `LockGroup`: ok [^1]: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/416 | ||
| 772ac0c4 | 2024-09-23 11:02:35 | keymap: Rename keysyms field in xkb_level The current field `u` (short for “union”) is not very descriptive. Next commit will add multiple actions per level, so let’s rename the keysym field to `s` (short for “symmbols”). | ||
| 31c6d866 | 2024-10-08 18:39:00 | symbols: Min. 2 keysyms in level list Do not allow `{ a }` when a single `a` suffices. | ||
| 7c4c718b | 2024-09-30 06:13:38 | Allow only the first group in symbols sections when using RMLVO Currently `xkb_keymap_num_layouts` may return a greater number than the number of layouts configured using RMLVO, because we allow symbols sections to define various groups per key. This is unintuitive and kind of buggy: groups should be added via rules by setting an explicit `:n` modifier. Fix: when parsing a keymap using RMLVO resolution: - Get the expected layouts count from the resulting KcCGST. - Drop the groups after the first one in included symbols sections. This will ensure that a symbol section can only define one group per key. Notes: - Compiling a keymap string directly is unaffected. - RMLVO resolution may still produce more groups than the input layouts. Indeed, some legacy rules in xkeyboard-config rely on this to insert automatically a US layout before the given non-Latin one, resulting in two layouts while only one was given. | ||
| 948f7a59 | 2024-10-09 08:34:27 | symbols: Skip interprets only for groups with explicit actions Previously setting explicit actions for a group in symbols files made the parser skip compatibility interpretations for the corresponding *whole* key, so the other groups with *no* explicit actions could result broken on some levels. In the following example, `<RALT>` would have an action on group 2, because it is explicit, but none on group 1 because interpretation are also skipped there as a side effect: ```c key <RALT> { symbols[1]= [ ISO_Level3_Shift ], symbols[2]= [ ISO_Level3_Shift ], actions[2]= [ SetMods(modifiers=LevelThree) ] }; ``` Fixed by skipping interpretations *only* for groups with explicit actions. We still set `key->explicit |= EXPLICIT_INTERP` if at least one group has explicit actions. In such case, when dumping a keymap, we will write explicit actions for *all* groups, in order to ensure that X11 and previous versions of libxkbcommon can parse the keymap as intended. One side effect is that no interpretation will be run on this key anymore, so we may have to set some extra fields explicitly: repeat, virtualMods. Thus the previous example would be bumped as: ```c key <RALT> { repeat= No, symbols[1]= [ ISO_Level3_Shift ], actions[1]= [ SetMods(modifiers=LevelThree,clearLocks) ], symbols[2]= [ ISO_Level3_Shift ], actions[2]= [ SetMods(modifiers=LevelThree) ] }; ``` | ||
| 3ed763c3 | 2024-10-09 07:11:13 | test: Add strip_lines and uncomment to text utils These allow us to store comments in files (especially keymaps), that can then be removed (e.g. to compare with output) or uncommented (e.g. to activate an optional line). | ||
| 929a485f | 2024-10-08 12:52:53 | symbols: Fix too liberal parsing of keysyms lists Currently we are too liberal when parsing symbols lists: e.g. `[{a,{b}}]` is parsed as `[{a,b}]` but it should be rejected. | ||
| 7a8772ba | 2024-10-08 07:13:39 | ci: Fix macOS - Bump macOS image, as macOS 12 has been deprecated. See: https://github.com/actions/runner-images?tab=readme-ov-file#available-images - Install PyYaml via Pip, as it has been disabled in Brew. See: https://docs.brew.sh/Homebrew-and-Python#pep-668-python312-and-virtual-environments - Fix libxml2 not linked. | ||
| 1d897502 | 2024-10-04 08:09:28 | keysyms: Update using latest xorgproto xorgproto commit: d7ea44d5f04cc476dee83ef439a847172f7a6bd1 Relevant MR: https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/91 | ||
| bf1ea088 | 2024-09-30 11:26:39 | Fix typo in darray_enumerate_from | ||
| 4ea9d431 | 2023-11-16 17:12:03 | rules: Add support for :all qualifier Some layout options require to be applied to every group to maintain consistency (e.g. a group switcher). Currently this must be done manually for all layout indexes. This is error prone and prevents the increase of the maximum group count. This commit introduces the `:all` qualifier for KcCGST values. When a rule with this qualifier is matched, it will expands the qualified value (and its optional merge mode) for every layout, e.g. `+group(toggle):all` (respectively `|group(toggle)`) would expand to `+group(toggle):1+group(toggle):2` (respectively `|group(toggle):1|group(toggle):2`) if there are 2 layouts, etc. If there is no merge mode, it defaults to *override* `+`, e.g. `x:all` expands to `x:1+x:2+x:3` for 3 layouts. Note that only the qualified *value* is expanded, e.g. `x+y:all` expands to `x+y:1+y:2` for 2 layouts. `:all` can be used in combination with special layout indexes. Since this can lead to an unexpected behaviour, a warning will be raised. | ||
| cdafba4f | 2024-09-24 15:23:16 | rules: Add support for index ranges There is a lot of repetition in the current rules files provided by xkeyboard-config, because the MLVO mappings need to match on the exact layout/variant index. This also prevents to increase the number of maximum groups, because it does not scale. We introduces the following new special layout/variant indexes: - “single”: matches a single layout; same as with no index. - “first”: matches the first layout/variant, no matter how many layouts are in the RMLVO configuration. It allows to merge `layout` and `layout[1]` patterns. - “later”: matches all but the first layout. This is an index range. - “any”: matches layout at any position. This is an index range. We also introduces the new `%i` expansion, which correspond to the index of the matched layout in a mapping with an index range. Example: layout[later] = symbols my_layout = +my_symbols:%i * = +%l[%i]:%i Let’s have a look at concrete examples from xkeyboard-config: ! model layout = symbols * * = pc+%l%(v) ! model layout[1] = symbols * * = pc+%l[1]%(v[1]) ! model layout[2] = symbols * * = +%l[2]%(v[2]) ! model layout[3] = symbols * * = +%l[3]%(v[3]) ! model layout[4] = symbols * * = +%l[4]%(v[4]) ! layout option = symbols * grp:toggle = +group(toggle) ! layout[1] option = symbols * grp:toggle = +group(toggle):1 ! layout[2] option = symbols * grp:toggle = +group(toggle):2 ! layout[3] option = symbols * grp:toggle = +group(toggle):3 ! layout[4] option = symbols * grp:toggle = +group(toggle):4 With this commit we can now simplify it into: ! model layout[first] = symbols * * = pc+%l[%i]%(v[%i]) ! model layout[later] = symbols * * = +%l[%i]%(v[%i]):%i ! layout[any] option = symbols * grp:toggle = +group(toggle):%i The latter rule will work even if we increase XKB_MAX_GROUPS, whereas the former would require to add the missing entries for the new groups. In order to maintain consistent rules, we now disallow layout and variant to have different indexes. For example, the following mapping are now invalid: - layout variant[1] - layout[1] variant[2] - layout[1] variant - layout[first] variant[1] - layout[first] variant - layout variant[any] - etc. | ||
| 076c60df | 2024-09-25 16:21:05 | rules: Ensure same number of layouts and variants |