New options
-K Run as command kbdmap(1). -V Run as command vidfont(1). -p, -print Print description of available keymaps or fonts to stdout and exit. Document that users should not choose MSDOS codepage keymaps or fonts.
This commit is contained in:
parent
fcee422588
commit
6aac9eb9ee
@ -34,7 +34,7 @@
|
||||
.\"
|
||||
.\" E-Mail: Wolfram Schneider <wosch@cs.tu-berlin.de>
|
||||
.\"
|
||||
.\" $Id: kbdmap.1,v 1.2 1996/01/30 13:49:17 mpp Exp $
|
||||
.\" $Id: kbdmap.1,v 1.3 1996/02/11 22:33:15 mpp Exp $
|
||||
.\"
|
||||
|
||||
.Dd Mar 25, 1995
|
||||
@ -47,9 +47,12 @@
|
||||
|
||||
.Sh SYNOPSIS
|
||||
.Nm kbdmap
|
||||
.Op Fl K
|
||||
.Op Fl V
|
||||
.Op Fl d | Fl default
|
||||
.Op Fl h | Fl help
|
||||
.Op Fl l | Fl lang Ar language
|
||||
.Op Fl p | Fl print
|
||||
.Op Fl r | Fl restore
|
||||
.Op Fl s | Fl show
|
||||
.Op Fl v | Fl verbose
|
||||
@ -62,8 +65,19 @@ do it for fonts.
|
||||
Both looking in a database for a description. Description is
|
||||
in English (default) or any other language.
|
||||
|
||||
It is strongly recommended to not choose MSDOS codepage keymaps
|
||||
or fonts. Use the ISO standard if available! X11 does not
|
||||
support MSDOS codepage.
|
||||
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width Ds
|
||||
.It Fl K
|
||||
Run as command
|
||||
.Xr kbdmap 1 .
|
||||
|
||||
.It Fl V
|
||||
Run as command
|
||||
.Xr vidfont 1 .
|
||||
|
||||
.It Fl d , Fl default
|
||||
Use default language. Ignore $LANG.
|
||||
@ -76,12 +90,16 @@ Use
|
||||
.Ar language
|
||||
for description and menu
|
||||
|
||||
.It Fl s , Fl show
|
||||
Show currently supported languages and exit.
|
||||
.It Fl p , Fl print
|
||||
Print description of available keymaps or fonts
|
||||
to stdout and exit.
|
||||
|
||||
.It Fl r , Fl restore
|
||||
Load default font from /etc/sysconfig
|
||||
|
||||
.It Fl s , Fl show
|
||||
Show currently supported languages and exit.
|
||||
|
||||
.It Fl v , Fl verbose
|
||||
More warnings.
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
#
|
||||
# E-Mail: Wolfram Schneider <wosch@cs.tu-berlin.de>
|
||||
#
|
||||
# $Id: kbdmap.pl,v 1.10 1995/04/03 21:13:52 w Exp $
|
||||
# $Id: kbdmap.pl,v 1.2 1995/04/05 08:09:24 jkh Exp $
|
||||
#
|
||||
|
||||
# simple test if syscons works
|
||||
@ -45,10 +45,6 @@ if ($x11) {
|
||||
"expect certain strange side-effects\n";
|
||||
sleep 2;
|
||||
}
|
||||
|
||||
#die "You are on a virtual console?\n" .
|
||||
# "This program does not work with X11\n" if $?;
|
||||
|
||||
|
||||
sub variables_static {
|
||||
$lang_default = "en"; # set default language
|
||||
@ -59,9 +55,9 @@ sub variables_static {
|
||||
$fontdir = "/usr/share/syscons/fonts";
|
||||
$sysconfig = "/etc/sysconfig";
|
||||
|
||||
#$keymapdir = "./syscons/keymaps";
|
||||
#$fontdir = "./syscons/fonts";
|
||||
#$sysconfig = "./sysconfig";
|
||||
# for test only
|
||||
#$keymapdir = "/tmp/kbdmap/syscons/keymaps";
|
||||
#$fontdir = "/tmp/kbdmap/syscons/fonts";
|
||||
|
||||
# read current font from sysconfig
|
||||
$font_default = "cp437-8x16.fnt";
|
||||
@ -229,6 +225,15 @@ sub menu_read {
|
||||
grep(s/8x8/8x08/, @a);
|
||||
@a = sort @a;
|
||||
grep(s/8x08/8x8/, @a);
|
||||
|
||||
if ($print) {
|
||||
foreach (@a) {
|
||||
s/"//g; #"
|
||||
print "$_\n";
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
return @a;
|
||||
}
|
||||
|
||||
@ -289,8 +294,8 @@ sub dialog {
|
||||
|
||||
sub usage {
|
||||
warn <<EOF;
|
||||
usage: $program\t[-v|-verbose] [-h|-help] [-l|-lang language]
|
||||
\t\t[-d|-default] [-s|-show] [-r|-restore]
|
||||
usage: $program\t[-K] [-V] [-d|-default] [-h|-help] [-l|-lang language]
|
||||
\t\t[-p|-print] [-r|-restore] [-s|-show] [-v|-verbose]
|
||||
EOF
|
||||
exit 1;
|
||||
}
|
||||
@ -302,13 +307,16 @@ sub parse {
|
||||
while($_ = $argv[0], /^-/) {
|
||||
shift @argv;
|
||||
last if /^--$/;
|
||||
if (/^--?(h|help|\?)$/) { &usage; }
|
||||
elsif (/^--?(v|verbose)$/) { $verbose = 1; }
|
||||
elsif (/^--?(l|lang)$/) { $lang = &lang($argv[0]); shift @argv; }
|
||||
elsif (/^--?(d|default)$/) { $lang = $lang_default }
|
||||
elsif (/^--?(s|show)$/) { $show = 1 }
|
||||
elsif (/^--?(r|restore)$/) { &vidcontrol($font_current); exit(0) }
|
||||
else { &usage }
|
||||
if (/^--?(h|help|\?)$/) { &usage; }
|
||||
elsif (/^-(v|verbose)$/) { $verbose = 1; }
|
||||
elsif (/^-(l|lang)$/) { $lang = &lang($argv[0]); shift @argv; }
|
||||
elsif (/^-(d|default)$/) { $lang = $lang_default }
|
||||
elsif (/^-(s|show)$/) { $show = 1 }
|
||||
elsif (/^-(p|print)$/) { $print = 1 }
|
||||
elsif (/^-(r|restore)$/) { &vidcontrol($font_current); exit(0) }
|
||||
elsif (/^-K$/) { $dir = $keymapdir; }
|
||||
elsif (/^-V$/) { $dir = $fontdir; }
|
||||
else { &usage }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user