summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perl-install/keyboard.pm18
-rwxr-xr-xperl-install/share/keymaps_generate2
-rwxr-xr-xperl-install/standalone/keyboarddrake2
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";