diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-07-24 21:15:45 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-07-24 21:15:45 +0000 |
commit | 6b2a4158cc229cf3bb1edb54c9428e567696b54a (patch) | |
tree | 008ca7c5826aa73d42ea6f633c95cb146f533de0 /perl-install/keyboard.pm | |
parent | 56b374075f45355184b2927cc2f24262dc7e6c21 (diff) | |
download | drakx-6b2a4158cc229cf3bb1edb54c9428e567696b54a.tar drakx-6b2a4158cc229cf3bb1edb54c9428e567696b54a.tar.gz drakx-6b2a4158cc229cf3bb1edb54c9428e567696b54a.tar.bz2 drakx-6b2a4158cc229cf3bb1edb54c9428e567696b54a.tar.xz drakx-6b2a4158cc229cf3bb1edb54c9428e567696b54a.zip |
no_comment
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r-- | perl-install/keyboard.pm | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index 2d147328c..2c6b84858 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -55,44 +55,17 @@ sub load($) { } sub setup(;$) { - my ($defkbd) = @_; + my ($keyboard) = @_; my $t; - $defkbd ||= $defaultKeyboards{$ENV{LANG}} || "us"; + $keyboard ||= $defaultKeyboards{$ENV{LANG}} || "us"; - my $file = "/usr/share/keymaps/$defkbd.kmap"; + my $file = "/usr/share/keymaps/$keyboard.kmap"; if (-e $file) { - log::l("loading keymap $defkbd"); + log::l("loading keymap $keyboard"); load(cat_($file)); } - -# local *F; -# open F, "/usr/etc/keymaps" or die "cannot open /usr/etc/keymaps: $!"; -# -# my $format = "i2"; -# read F, $t, psizeof($format) or die "failed to read keymaps header: $!"; -# my ($magic, $numEntries) = unpack $format, $t; -# -# log::l("%d keymaps are available", $numEntries); -# -# my @infoTable; -# my $format2 = "i Z40"; -# foreach (1..$numEntries) { -# read F, $t, psizeof($format2) or die "failed to read keymap information: $!"; -# push @infoTable, [ unpack $format2, $t ]; -# } -# -# foreach (@infoTable) { -# read F, $t, $_->[0] or die "error reading keymap data: $!"; -# -# if ($defkbd eq $_->[1]) { -# log::l("using keymap $_->[1]"); -# load($t); -# &write("/tmp", $_->[1]); -# return; -# } -# } -# die "keyboard $defkbd not found in /usr/etc/keymaps"; + $keyboard; } sub write($$) { |