mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git
synced 2026-01-26 14:13:24 +00:00
Before this commit, the loadkeys tool enabled to dump a keymap in
various formats (binary, C) but not in its own text format. However,
there are some use cases that require text format:
- reformatting;
- golden test;
- round-trip test;
- convert XKB keymaps and thus replace ckbcomp[^1] (requires the
upcoming XKB support).
Added the `--tkeymap` (short: `-t`) options to the loadkeys tool,
enabling dumping the keymap in *text* format after parsing it.
The output format (shape) can be optionally specified, e.g. `--tkeymap=4`
for a full table.
The option name mirrors the `--bkeymap` option that outputs a *binary*
table, so that option names are consistent: `--{b,t}keymap`.
[^1]: https://manpages.debian.org/buster/console-setup/ckbcomp.1.en.html
Signed-off-by: Pierre Le Marre <dev@wismill.eu>