changes/tools


Log

Author Commit Date CI Message
Pierre Le Marre 955eef14 2025-03-28T06:30:05 tools: Ensure to honor user locale This is just good practice, but it is also necessary if we want to facilitate the discovery of issues with locales in libxkbcommon.
Pierre Le Marre 275ffa66 2025-03-13T21:28:35 tools: Make --kccgst xkbcli-compile-keymap option public The new public option `--kccgst` enables to display the result of RMLVO resolution to KcCGST components. This option has the same function than `setxkbmap -print`. This is particularly useful for debugging issues with the rules. Before this commit it was a private API. This commit enables us to remove the *internal* version of `xkbcli-compile-keymap`.
Pierre Le Marre b3465081 2025-03-12T00:20:39 Bump version to 1.8.1 and update changelog
Pierre Le Marre 5cfd36ab 2025-02-14T10:35:49 tools: Do not load names from the environment by default Our tools are debugging tools and as such we need to have complete control to be able to reproduce setups. This is not currently the case, as we do not use `XKB_CONTEXT_NO_ENVIRONMENT_NAMES` by default nor can we set it. So it is very easy to forget about the various `XKB_DEFAULT_*` environement variables for the default RMLVO values, then to get puzzled by unexpected results. Added to that, these environment variables do not work correctly in `xkbcli-compile-xeymap`: calling the tool without RMLVO values will use these variables only if the RMLVO values are set explicitly empty or if the various *constants* `DEFAULT_XKB_*` are empty. This is unexpected, as the environment variables should *always* be used unless: - `XKB_CONTEXT_NO_ENVIRONMENT_NAMES` is used (not the case here); - the variable is empty; in this case the constants `DEFAULT_XKB_*` are used. Fixed by the following *breaking change*: make the tools use `XKB_CONTEXT_NO_ENVIRONMENT_NAMES` *by default*, unless the new `--enable-environment-names` option is used. We also make `rmlvo` incompatible with `--enable-environment-names` for now in the public tool, as else it requires a private API.
Pierre Le Marre 76740e0c 2025-01-30T14:21:00 Bump version to 1.8.0 and update changelog
Pierre Le Marre 848ecacf 2025-01-30T09:12:54 tools: Enable Compose file positional argument and piping Also deprecate the `--file` flag as redundant.
Pierre Le Marre b168623c 2025-01-28T13:24:14 tools: Enable using keymap file as a positional argument
Pierre Le Marre 313001ce 2025-01-28T13:48:02 tools: Add --keymap alias and enable loading keymap files Add `--keymap` as a more intuitive alias to `--from-xkb`; it also makes it consistent with `interactive-evdev`. It optionally accepts a keymap file path; if the argument is empty or `-` then the keymap is read from `stdin`.
Pierre Le Marre b6acdc30 2025-01-10T20:31:04 xkbcli list: Fix duplicate variants
Pierre Le Marre 628242b2 2024-11-14T18: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`.
Pierre Le Marre b8888345 2024-09-20T09: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.
Pierre Le Marre 0cd1087a 2024-09-12T01:43:56 xkbcli how-to-type: Enhance arguments parsing & doc Currently the positional parameter of the CLI is either a Unicode code point or a keysym. However their respective format is not documented. It turns out that there are multiple issues due to the use of `strtol`: - Code points can be parsed as octal, decimal and hexadecimal, while keysyms can only be parsed as hexadecimal. Some programs outputs keysyms in their decimal form (e.g. `wev`) so it is worth to bring symmetry with code points. - Octal format is unusual for both and is triggered by leading zeros, which is unintuitive in this context. - `U+NNNN` format is the standard format for Unicode code points but is not supported. - Plain characters are not supported, e.g.: a, é, ß, Æ, γ, 🦆, etc. Although this is probably the easiest format for most users. Fixed the issues above: - Allow the code point to be passed exactly in the following formats: - Literal character (requires UTF-8 character encoding of the terminal); - Decimal number; - Hexadecimal number: either `0xNNNN` or `U+NNNN` (any digit count) - Allow the keysym to be passed exactly in the following formats: - Decimal number; - Hexadecimal number: `0xNNNN` (any digit count); - Name. - Improve both `--help` message and manual page.
Pierre Le Marre e4269202 2024-09-20T10:41:00 keysyms: Fix off-by-one XKB_KEYSYM_NAME_MAX_SIZE The constant did not account for the terminating `NULL` byte and this was sadly not caught by the tests. Fixed the invalid value, the corresponding script and the tests.
Pierre Le Marre 737706fe 2024-03-07T10:08:16 doc: Use towncrier to handle release notes Towncrier is a utility to produce useful, summarized news files. See: - https://pypi.org/project/towncrier/ - https://towncrier.readthedocs.io Custom configuration for xkbcommon: - New fragments are located in the `changes` directory. - 3 sections: - API: `changes/api` - Tools: `changes/tools` - Build System: `changes/build` - 3 news fragments: - Breaking changes: `.breaking` - New: `.feature` - Fixes: `.bugfix` `NEWS` is renamed to `NEWS.md` because the tool requires `.md` extension to write in markdown format.