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 | |
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')
-rw-r--r-- | perl-install/keyboard.pm | 18 | ||||
-rwxr-xr-x | perl-install/share/keymaps_generate | 2 | ||||
-rwxr-xr-x | perl-install/standalone/keyboarddrake | 2 |
3 files changed, 16 insertions, 6 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. } diff --git a/perl-install/share/keymaps_generate b/perl-install/share/keymaps_generate index 9c40d5e58..0265502c9 100755 --- a/perl-install/share/keymaps_generate +++ b/perl-install/share/keymaps_generate @@ -6,7 +6,7 @@ use keyboard; my $dir = "keymaps/usr/share/keymaps"; system("rm -rf keymaps ; mkdir -p keymaps/usr/share/keymaps"); -foreach (keyboard::xmodmaps()) { +foreach (keyboard::keyboards()) { my $kmap = keyboard::keyboard2kmap($_); if (system("./kmap2bkmap $kmap > $dir/$kmap.bkmap 2>/dev/null") != 0) { warn "unknown kmap $kmap\n"; diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake index da23cdc28..6a0b86d86 100755 --- a/perl-install/standalone/keyboarddrake +++ b/perl-install/standalone/keyboarddrake @@ -27,7 +27,7 @@ begin: $keyboard ||= $in->ask_from_listf_(_("Keyboard"), _("Please, choose your keyboard layout."), \&keyboard::keyboard2text, - [ keyboard::xmodmaps() ], + [ keyboard::keyboards() ], keyboard::read()); keyboard::keyboard2text($keyboard) or die "bad keyboard $keyboard\n"; |