51 Commits

Author SHA1 Message Date
Pierre Le Marre
7e08c6f50f
loadkeys: Add --tkeymap to dump the keymap as text
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>
2025-05-31 12:36:53 +02:00
Alexey Gladkov
ba9800800d
Update kbd_mode man-page
Signed-off-by: Alexey Gladkov <legion@kernel.org>
2025-02-04 14:08:45 +01:00
Alexey Gladkov
f126e60e9c
Update man pages
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>
2024-10-25 11:04:50 +02:00
Alexey Gladkov
9ab9874908
Use -std=gnu11
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>
2024-10-19 00:12:27 +02:00
Alexey Gladkov
065445590c
setfont: Add long options to man page
Signed-off-by: Alexey Gladkov <legion@kernel.org>
2024-10-05 15:38:19 +02:00
Alexey Gladkov
3a84d92dd0
setfont.8: Fix variable substitution
Fixes: e7155be9 ("Define keymaps and fonts layout in one place")
Signed-off-by: Alexey Gladkov <legion@kernel.org>
2024-10-01 17:41:55 +02:00
Alexey Gladkov
1291ac8eae
setfont: add documentation for the -R option
Signed-off-by: Alexey Gladkov <legion@kernel.org>
2024-10-01 14:49:37 +02:00
Alexey Gladkov
e7155be92e
Define keymaps and fonts layout in one place
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>
2024-09-28 21:13:31 +02:00
Alexey Gladkov
096e3f1439
Fix kernel source path in the man pages
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>
2024-09-28 14:46:19 +02:00
Alexey Gladkov
ab048a99b6
Do not substitute variables from configure
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>
2024-09-28 14:46:19 +02:00
Alexey Gladkov
f3faba1640
Merge branch 'github-pull-111' into for-master
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>
2024-03-26 18:55:36 +01:00
Petr Gajdoš
c448995b46
drop doshell reference from openvt.1
openvt(1) refers to doshell(8) man page that does not exist anywhere.
Remove it.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2024-03-26 18:54:19 +01:00
Alexey Gladkov
2f782c688b
Remove outdated docs
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>
2024-03-13 15:47:12 +01:00
Jakub Wilk
648ea9ddba Use HTTPS for GitHub URLs
GitHub has dropped support for the git:// protocol:
https://github.blog/changelog/2022-03-15-removed-unencrypted-git-protocol-and-certain-ssh-keys/

Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
2024-02-26 08:38:50 +01:00
Alexey Gladkov
d38785b4e4
README: Update mailing list
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2023-12-13 16:46:57 +00:00
Alexey Gladkov
1589e9e101
Keymap for PinePhone keyboard
Link: https://wiki.pine64.org/wiki/PinePhone_(Pro)_Keyboard
Link: https://codeberg.org/HazardChem/PinePhone_Keyboard/src/branch/main/tty
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2022-05-29 14:18:07 +02:00
Benno Schulenberg
4bb0468bf8
docs: use the correct name for the sticky Shift symbol (SShift) 2022-05-20 19:18:53 +02:00
Alexey Gladkov
104f376e96
Update general info in README and CONTRIBUTING
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2022-03-21 19:57:07 +01:00
ahmogit
b0faf82b2e
Document -f option, per Issue #65
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>
2022-01-14 15:50:42 +01:00
Alexey Gladkov
42667e7525
man: loadkeys: Remove enumeration of options from SYNOPSIS
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2021-10-28 18:26:40 +02:00
Alexey Gladkov
996970701b
man: dumpkeys: Document a few missing options
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2021-10-28 17:45:23 +02:00
Alexey Gladkov
4e3d137bc4
man: dumpkeys: Remove enumeration of options from SYNOPSIS
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2021-10-28 17:45:23 +02:00
Alexey Gladkov
ee2af5f29e
fix typos
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2021-10-05 13:57:49 +02:00
Andre Schmidt
424a99d081
Add hexadecimal file support for setvtrgb.
new files:
- contrib/vtrgb-dec2hex.sh: convert setvtrgb decimal file to hexadecimal
- contrib/vtrgb.ubuntu.hex: for hexadecimal file test
  - creted with: ./contrib/vtrgb-dec2hex.sh contrib/vtrgb.ubuntu > contrib/vtrgb.ubuntu.hex

Signed-off-by: Andre Schmidt <andre@osku.de>
2021-10-04 14:21:24 +02:00
Alexey Gladkov
f3b1936a30
man: Update title line
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2020-07-08 19:48:22 +02:00
Alexey Gladkov
5c68df2ec4
Fix problems with formatting man pages
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2020-07-08 18:39:54 +02:00
Alexey Gladkov
8bd44e14fd
Fix problems with formatting man pages
Reported-by: Helge Kreutzmann <debian@helgefjell.de>
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2020-05-25 16:15:21 +02:00
Bjarni Ingi Gislason
b01f34d8f5
kbd/docs/man/man8misc: Fix some extra space and formatting
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>
####
2020-03-30 22:18:02 +02:00
Bjarni Ingi Gislason
6c9e1c689b
docs/man/man8: Fix a warning from "groff", fonts and a trailing space
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>
2020-03-30 22:18:02 +02:00
Bjarni Ingi Gislason
e59c06738b
docs/man/man1: Fix warnings from "groff" and some other formatting
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>
####
2020-03-30 22:18:02 +02:00
Bjarni Ingi Gislason
eda1cdbf38
docs/man/man1misc: Fix a warning from "groff" and spaces
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>
2020-03-30 22:18:01 +02:00
Bjarni Ingi Gislason
d3245b537a
docs/man/man5: Fix warnings 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/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>
2020-03-30 22:18:01 +02:00
Alex Gladkov
74bbe845be
Use autoconf variables
Signed-off-by: Alex Gladkov <gladkov.alexey@gmail.com>
2019-12-19 11:23:57 +01:00
Ben Pfaff
f0f22e65c5
setfont: Add option -d to double size of font.
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>
2019-09-26 10:15:02 +02:00
Alexey Gladkov
abcdbdd68c
Update Doxyfile and add some documentation
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2019-06-26 11:28:39 +02:00
Alexey Gladkov
e25dbc5aef
Initialize the kbdfile context internally if necessary
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2019-06-26 10:49:31 +02:00
Alexey Gladkov
a4edc7daa9
setmetamode: Add long options and update manpage
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2019-06-24 13:45:13 +02:00
Alexey Gladkov
821dc28aee
setvtrgb: Add long options and --console option
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2019-06-21 15:37:11 +02:00
Alexey Gladkov
3ceda1f1b8
kbdinfo: Add long options and manpage
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2019-06-21 14:11:24 +02:00
Alexey Gladkov
f888bbe718
Update kbdrate.8 manpage
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2019-06-21 10:09:04 +02:00
Balint Reczey
e0941d734c
kbd_mode: Add -f option and deny dangerous mode switches without it
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>
2019-05-08 11:17:12 +02:00
Alexey Gladkov
184c028d77
Add help and version options
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2019-05-08 11:04:55 +02:00
Alexey Gladkov
cd146ee46d
Add help and version options
Fixes https://github.com/legionus/kbd/issues/22

Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2019-05-08 11:03:52 +02:00
Vitezslav Crhonek
08dc021d72 Fix typo in man loadkeys 2019-01-09 12:13:37 +01:00
Eric S. Raymond
403ef74653
Problems with loadkeys.1
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.
2018-10-02 19:56:26 +02:00
Eric S. Raymond
674396f88a
Problems with codepage.1
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.
2018-10-02 19:52:33 +02:00
Alexey Gladkov
824f334754
Update docs and add info how to contribute
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2017-08-30 23:33:43 +02:00
Vitezslav Crhonek
1ffebc9fcc Improve consistency of man pages and usage messages. 2016-05-18 23:38:40 +02:00
Álvar Ibeas
758ae0c98c keymaps.5: Fix markup
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2015-01-25 14:44:33 +03:00
Alexey Gladkov
4510f5c31c docs: Add header for libkeymap
Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
2014-01-06 05:09:01 +04:00