summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-28 21:16:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-28 21:16:32 +0000
commitff872004f6d5f202a6a8cd418bad3b2458d2ed66 (patch)
tree984a3ea576f9090b2aad069550b65a6595c04d4c /perl-install/keyboard.pm
parentc047aee8e84b723f6910defab8b0de8063502490 (diff)
downloaddrakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar
drakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.gz
drakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.bz2
drakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.tar.xz
drakx-ff872004f6d5f202a6a8cd418bad3b2458d2ed66.zip
no_comment
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm22
1 files changed, 11 insertions, 11 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index f5c4dc5a7..dc6ab0b4b 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -207,13 +207,13 @@ sub loadkeys_files {
@l, keys %l, grep { -e $_ } map { "$p/$_.inc.gz" } qw(compose euro windowkeys linux-keys-bare);
}
-sub lang2keyboard($) {
- local ($_) = @_;
- my $kb = $lang2keyboard{$_} || $keyboards{$_} && $_ || "us";
+sub lang2keyboard {
+ my ($l) = @_;
+ my $kb = $lang2keyboard{$l} || $keyboards{$l} && $l || "us";
$keyboards{$kb} ? $kb : "us"; #- handle incorrect keyboad mapping to us.
}
-sub load($) {
+sub load {
my ($keymap) = @_;
return if $::testing;
@@ -253,25 +253,25 @@ sub xmodmap_file {
-e $f && $f;
}
-sub setup($) {
+sub setup {
return if arch() =~ /^sparc/;
my ($keyboard) = @_;
my $o = $keyboards{$keyboard} or return;
log::l("loading keymap $o->[1]");
- if (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$o->[1].kmap")) {
- load(cat_($f));
+ if (-e (my $f = "$ENV{SHARE_PATH}/keymaps/$o->[1].bkmap")) {
+ load(scalar cat_($f));
} else {
local *F;
- open F, "packdrake -x $ENV{SHARE_PATH}/keymaps.cz2 '' $o->[1].kmap |";
+ open F, "packdrake -x $ENV{SHARE_PATH}/keymaps.cz2 '' $o->[1].bkmap |";
local $/ = undef;
- eval { load(<F>) };
+ eval { load(scalar <F>) };
}
my $f = xmodmap_file($keyboard);
eval { run_program::run('xmodmap', $f) } unless $::testing || !$f;
}
-sub write($$$;$) {
+sub write {
my ($prefix, $keyboard, $charset, $isNotDelete) = @_;
setVarsInSh("$prefix/etc/sysconfig/keyboard", { KEYTABLE => keyboard2kmap($keyboard),
@@ -280,7 +280,7 @@ sub write($$$;$) {
run_program::rooted($prefix, "dumpkeys > /etc/sysconfig/console/default.kmap") or log::l("dumpkeys failed");
}
-sub read($) {
+sub read {
my ($prefix) = @_;
my %keyf = getVarsFromSh("$prefix/etc/sysconfig/keyboard");