diff options
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index c9b306377..560f5feb9 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -109,6 +109,7 @@ sub selectKeyboard { if ($::expert || $clicked || !($from_usb || @$l && $l->[0][1] >= 90) || listlength(lang::langs($o->{locale}{langs})) > 1) { add2hash($o->{keyboard}, $from_usb); my @best = uniq($from_usb ? $from_usb->{KEYBOARD} : (), map { $_->[0] } @$l); + @best = () if @best == 1; my $format = sub { translate(keyboard::KEYBOARD2text($_[0])) }; my $other; @@ -121,12 +122,12 @@ sub selectKeyboard { advanced_label => N("More"), callbacks => { changed => sub { $other = $_[0] == 1 } }, }, - [ if_(@best > 1, { val => \$KEYBOARD, type => 'list', format => $format, sort => 1, - list => [ @best ] }), + [ if_(@best, { val => \$KEYBOARD, type => 'list', format => $format, sort => 1, + list => [ @best ] }), { val => \$ext_keyboard, type => 'list', format => $format, list => [ difference2([ keyboard::KEYBOARDs() ], \@best) ], advanced => @best > 1 } ]); - $o->{keyboard}{KEYBOARD} = @best <= 1 || $other ? $ext_keyboard : $KEYBOARD; + $o->{keyboard}{KEYBOARD} = !@best || $other ? $ext_keyboard : $KEYBOARD; delete $o->{keyboard}{unsafe}; } keyboard::group_toggle_choose($o, $o->{keyboard}) or goto &selectKeyboard; |