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>
The man-pages of the utilities do not contain supported options. We need
to add new options and document the missing ones in the man-page.
Also added the AUTHORS section to man-pages.
Signed-off-by: Alexey Gladkov <legion@kernel.org>
Such a standard is used for linux kernel compilation. Since kbd follows
the linux kernel interfaces we can use the same standard for compiler.
Signed-off-by: Alexey Gladkov <legion@kernel.org>
The directory layout is defined in makefiles, in paths.h and is
hardcoded in the documentation. There's no reason to define layout in
different places.
Signed-off-by: Alexey Gladkov <legion@kernel.org>
The path to the kernel source tree is different on different
architectures. To avoid data discrepancy we will define them in one
place.
Signed-off-by: Alexey Gladkov <legion@kernel.org>
According to the autoconf documentation, the project should not rely on
AC_CONFIG_FILES to replace bindir and friends:
In order to support these features, it is essential that datarootdir
remains defined as '${prefix}/share', so that its value can be expanded
based on the current value of prefix.
A corollary is that you should not use these variables except in
makefiles. For instance, instead of trying to evaluate datadir in
configure and hard-coding it in makefiles using e.g.,
'AC_DEFINE_UNQUOTED([DATADIR], ["$datadir"], [Data directory.])', you
should add -DDATADIR='$(datadir)' to your makefile’s definition of
CPPFLAGS (AM_CPPFLAGS if you are also using Automake).
Similarly, you should not rely on AC_CONFIG_FILES to replace bindir and
friends in your shell scripts and other files; instead, let make manage
their replacement. For instance Autoconf ships templates of its shell
scripts ending with '.in'.
Keeping this in mind let's add our own rule for substituting variables
into source code. The '.in' suffix is taken up by automake so it's worth
coming up with some other suffix.
Link: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Installation-Directory-Variables.html
Signed-off-by: Alexey Gladkov <legion@kernel.org>
These are a number of changes from openSUSE that Stanislav Brabec sent
to the upstream.
Link: https://github.com/legionus/kbd/pull/111
Signed-off-by: Alexey Gladkov <legion@kernel.org>
All or almost all of this documentation is hopelessly outdated and
describes projects that no longer exist.
Signed-off-by: Alexey Gladkov <legion@kernel.org>
Basis: Comment by Alexey Gladkov 10 Jan 2022 05:59:23 -0800:
https://github.com/legionus/kbd/issues/65#issuecomment-1008898492
Reworded slightly from the above comment, but hopefully captures the key points.
Signed-off-by: Glenn D. Golden <gdg@zplane.com>
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
[ "test-groff" is a developmental version of "groff" ]
Input file is ./docs/man/man8misc/clrunimap.8
troff: <docs/man/man8misc/clrunimap.8>:20: warning: trailing space
####
Input file is ./docs/man/man8misc/getunimap.8
troff: <docs/man/man8misc/getunimap.8>:17: warning: trailing space
troff: <docs/man/man8misc/getunimap.8>:19: warning: trailing space
troff: <docs/man/man8misc/getunimap.8>:41: warning: trailing space
troff: <docs/man/man8misc/getunimap.8>:44: warning: trailing space
troff: <docs/man/man8misc/getunimap.8>:59: warning: trailing space
####
Input file is ./docs/man/man8misc/mk_modmap.8
troff: <docs/man/man8misc/mk_modmap.8>:9: warning: trailing space
troff: <docs/man/man8misc/mk_modmap.8>:21: warning: trailing space
<docs/man/man8misc/mk_modmap.8>:34 (macro BR): only 1 argument, but more are expected
####
Input file is ./docs/man/man8misc/setlogcons.8
troff: <docs/man/man8misc/setlogcons.8>:4: warning: trailing space
<docs/man/man8misc/setlogcons.8>:6 (macro BI): only 1 argument, but more are expected
<docs/man/man8misc/setlogcons.8>:7 (macro BI): only 1 argument, but more are expected
troff: <docs/man/man8misc/setlogcons.8>:17: warning: trailing space
<docs/man/man8misc/setlogcons.8>:21 (macro BI): only 1 argument, but more are expected
####
Input file is ./docs/man/man8misc/setvesablank.8
troff: <docs/man/man8misc/setvesablank.8>:9: warning: trailing space
troff: <docs/man/man8misc/setvesablank.8>:13: warning: trailing space
####
Input file is ./docs/man/man8misc/vcstime.8
<docs/man/man8misc/vcstime.8>:9 (macro BI): only 1 argument, but more are expected
troff: <docs/man/man8misc/vcstime.8>:18: warning: trailing space
<docs/man/man8misc/vcstime.8>:23 (macro BR): only 1 argument, but more are expected
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
####
Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
[ "test-groff" is a developmental version of "groff" ]
Input file is ./docs/man/man8/setfont.8.in
<docs/man/man8/setfont.8.in>:14 (macro RI): only 1 argument, but more are expected
####
Remove space at end of lines:
mapscrn.8.in:25:.B G0
mapscrn.8.in:62:Format (1) is a direct image of the translation
mapscrn.8.in:65:Format (2) is used to fill the
mapscrn.8.in:76:.B 1. Decimal:
mapscrn.8.in:79:.B 2. Octal:
mapscrn.8.in:82:.B 3. Hexadecimal:
mapscrn.8.in:88:.B 5. Character:
resizecons.8:27:registers. Only changing the number of rows is slightly easier, and
setfont.8.in:72:bytes per character (0 <
###
Set only '[' and ']' in roman font in the chapter SYNOPSIS.
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
1) Remove space at end of lines
2) Fix some wrong fonts
3) Fix warnings from test-groff.
Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
[ "test-groff" is a developmental version of "groff" ]
Input file is ./dumpkeys.1.in
<dumpkeys.1.in>:218 (macro BI): only 1 argument, but more are expected
####
Input file is ./fgconsole.1
<fgconsole.1>:8 (macro BI): only 1 argument, but more are expected
<fgconsole.1>:42 (macro IR): only 1 argument, but more are expected
####
Input file is ./loadkeys.1.in
<loadkeys.1.in>:220 (macro BI): only 1 argument, but more are expected
<loadkeys.1.in>:224 (macro BI): only 1 argument, but more are expected
####
Input file is ./openvt.1
<openvt.1>:12 (macro BR): only 1 argument, but more are expected
<openvt.1>:67 (macro BR): only 0 argument, but more are expected
<openvt.1>:83 (macro BR): only 0 argument, but more are expected
####
Input file is ./psfxtable.1
<psfxtable.1>:34 (macro IR): only 1 argument, but more are expected
####
Input file is ./setleds.1
troff: <setleds.1>:63: warning: escape character ignored before '+'
troff: <setleds.1>:69: warning: escape character ignored before '+'
troff: <setleds.1>:75: warning: escape character ignored before '+'
####
Input file is ./unicode_start.1
<unicode_start.1>:38 (macro BR): only 1 argument, but more are expected
####
Input file is ./unicode_stop.1
<unicode_stop.1>:19 (macro BR): only 1 argument, but more are expected
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
####
1) Remove space at end of lines:
splitfont.1:9:.I fontfile
splitfont.1:18:This works for Linux console fonts, without PSF headers,
2) Fix a warning from "groff".
Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
[ "test-groff" is a developmental version of "groff" ]
Input file is ./docs/man/man1misc/splitfont.1
troff: <docs/man/man1misc/splitfont.1>:14: warning: macro 'splitfont' not defined (possibly missing space after 'sp')
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
Output is from: test-groff -b -e -mandoc -T utf8 -rF0 -t -w w -z
[ "test-groff" is a developmental version of "groff" ]
Input file is ./docs/man/man5/keymaps.5
<docs/man/man5/keymaps.5>:81 (macro BI): only 1 argument, but more are expected
<docs/man/man5/keymaps.5>:94 (macro BI): only 1 argument, but more are expected
<docs/man/man5/keymaps.5>:336 (macro BI): only 0 argument, but more are expected
an-end-check:<docs/man/man5/keymaps.5>: Warning: Different number of .RS and .RE calls, an-RS-open=1 at end of file
Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
On high pixel density systems, such as 4k displays, typical font sizes like
8x16 are illegible to most readers. One solution would be to install and
use fonts that are designed for these displays, but currently these are not
widely available and perhaps they will never be available in all the same
varieties as the low-density fonts that have been used for a long time.
This patch introduces an alternative: it implements a -d option to setfont
that causes each pixel to be doubled along each axis (which actually
quadruples the size of the font). It makes all of the traditional fonts
usable on high-DPI display.
Signed-off-by: Ben Pfaff <blp@cs.stanford.edu>
kbd_mode(1) already had a warning but kbd_mode still performed all
mode changes even when they made keyboards unusable.
The added flag let's the callers try safe changes or force the risky
ones. This change may break scripts but the broken scripts most likely
made the keyboard unusable and should be updated.
Original bug report at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/520546
Signed-off-by: Balint Reczey <balint.reczey@canonical.com>
Unbalanced group in command synopsis. You probably forgot
to open or close a [ ] or { } group properly.
See http://catb.org/~esr/doclifter/bugs.html for details.
Broken command synopsis syntax. This may mean you're using a
construction in the command synopsis other than the standard
[ ] | { }, or it may mean you have running text in the command synopsis
section (the latter is not technically an error, but most cases of it
are impossible to translate into DocBook markup), or it may mean the
command syntax fails to match the description.
The incorrect sytntax used to express option alternation cannot be lifted
to XML. In addition, use of <> around the filename argument violates
the normal convention and is unparseable.
See http://catb.org/~esr/doclifter/bugs.html for details.