tools/compile-keymap.c


Log

Author Commit Date CI Message
Ran Benita e120807b 2025-01-29T15:35:22 Update license notices to SDPX short identifiers + update LICENSE Fix #628. Signed-off-by: Ran Benita <ran@unusedvar.com>
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 bcb16d29 2025-01-28T13:19:06 tools: Miscellaneous enhancements
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 ae473f9f 2025-01-28T09:25:33 tools: Fix return code of compile-keymap Previously when using `--keymap` we mistakenly returned a boolean so that `true` (resp. false) translated to `EXIT_FAILURE` (resp. `EXIT_SUCCESS`). Fixed by returning the proper return code integer.
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 7c4c718b 2024-09-30T06: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.
Pierre Le Marre 4b58ff78 2023-10-25T20:59:36 Fix memory leak in print_keymap The string buffer was not freed.
Pierre Le Marre 1c1542d6 2023-09-29T20:44:06 Tools: Add bash completions for xkbcli - Add bash completion script. It parses the commands help messages to provide the completions, thus any new subcommand or option will be supported, as long as it has its entry in the help messages. This should result in low maintenancei effort. - Add installation entry in Meson. The path can be configured using the following options: - `enable-bash-completion` to enable the installation; - `bash-completion-path` to control the installation path. It will default to: `share/bash-completion/completions`. TODO: completion for other shells, such as zsh?
Ran Benita f75c0a2d 2023-07-01T19:39:31 xkbcli: allow compile-keymap without args All of the arguments have defaults, but still an argument is required. Make it work. Signed-off-by: Ran Benita <ran@unusedvar.com>
Ran Benita 95111740 2020-07-25T16:36:54 tools/compile-keymap: hide --kccgst comment on public build Signed-off-by: Ran Benita <ran@unusedvar.com>
Ran Benita 2fefe558 2020-07-25T16:34:11 tools: fix strcmp mistake in 0066e38 Signed-off-by: Ran Benita <ran@unusedvar.com>
Ran Benita 0066e387 2020-07-25T15:49:17 tools: make independent from src/ Signed-off-by: Ran Benita <ran@unusedvar.com>
Peter Hutterer ce5eb1ac 2020-07-24T13:31:03 tools: link the tools against libxkbcommon.so only The tools previously linked against a static version (by simply recompiling everythiong). This isn't necessary, we can link them against libxkbcommon.so. Only exception: The xbkcli-compile-keymap tool needs a private API for the --kccgst flag. Avoid this by disabling this flag in the installed tool and building the same tool, statically linked but not-installed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer a472e030 2020-07-24T13:25:11 tools: avoid use of a private api This is merely to fill in some NULL pointers anyway, we can just use the #defines we have available at build time. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer 71418206 2020-07-09T12:15:45 tools: consistently return 2 on invalid usage Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Peter Hutterer 29e80e7b 2020-07-08T13:30:47 tools: install our tools as xkbcli subcommands The xkbcli tool usage help is ifdef'd out where the tool isn't built but the man page always includes all tools. Easier that way. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>