diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-02-10 12:00:08 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-02-10 12:00:08 +0000 |
commit | 59c169d708f97c6244aa9fa6fe99912ecae7de1b (patch) | |
tree | fbcb873aa4c89cc284c33a4a8fea78150af46b23 /perl-install/keyboard.pm | |
parent | 230c75dfce6576f56448b761a5ee84e7e7b1956e (diff) | |
download | drakx-backup-do-not-use-59c169d708f97c6244aa9fa6fe99912ecae7de1b.tar drakx-backup-do-not-use-59c169d708f97c6244aa9fa6fe99912ecae7de1b.tar.gz drakx-backup-do-not-use-59c169d708f97c6244aa9fa6fe99912ecae7de1b.tar.bz2 drakx-backup-do-not-use-59c169d708f97c6244aa9fa6fe99912ecae7de1b.tar.xz drakx-backup-do-not-use-59c169d708f97c6244aa9fa6fe99912ecae7de1b.zip |
- lang2keyboards handle keyboard percentages
- xmodmaps now named keyboards
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r-- | perl-install/keyboard.pm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index f0b724b67..d5eeb9876 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -69,9 +69,9 @@ my %lang2keyboard = 'lt' => 'lt', 'mk' => 'mk', 'nb' => 'no', - 'nl' => 'us_intl', # 95 us_intl, 2 uk, 1 nl 'nl_BE'=> 'be', -'nl_NL'=> 'nl', +'nl_NL'=> 'us_intl:95 uk:2 nl:1', +#'nl_NL'=> 'nl', 'no' => 'no', 'no@nynorsk' => 'no', 'ny' => 'no', @@ -192,7 +192,7 @@ arch() eq "ppc" ? ( #-###################################################################################### #- Functions #-###################################################################################### -sub xmodmaps { keys %keyboards } +sub keyboards { keys %keyboards } sub keyboard2text { $keyboards{$_[0]} && $keyboards{$_[0]}[0] } sub keyboard2kmap { $keyboards{$_[0]} && $keyboards{$_[0]}[1] } sub keyboard2xkb { $keyboards{$_[0]} && $keyboards{$_[0]}[2] } @@ -217,9 +217,19 @@ sub loadkeys_files { @l, keys %l, grep { -e $_ } map { "$p/$_.inc.gz" } qw(compose euro windowkeys linux-keys-bare); } +sub unpack_keyboards { + my ($k) = @_ or return; + [ map { [ split ':' ] } split ' ', $k ]; +} +sub lang2keyboards { + my ($l) = @_; + my $li = unpack_keyboards($lang2keyboard{$l}) || [ $keyboards{$l} && $l || "us" ]; + $li->[0][1] ||= 100; + $li; +} sub lang2keyboard { my ($l) = @_; - my $kb = $lang2keyboard{$l} || $keyboards{$l} && $l || "us"; + my $kb = lang2keyboards($l)->[0][0]; $keyboards{$kb} ? $kb : "us"; #- handle incorrect keyboad mapping to us. } |