diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-06-03 04:43:02 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-06-03 04:43:02 +0000 |
commit | 75f10e1d115428b94fb845e93bb001c3b48f10c6 (patch) | |
tree | 97c4011caac52b6b286a1174fda6cad37de46211 /perl-install | |
parent | 76b345d025f7db7546230513138fc87f7597a4ac (diff) | |
download | drakx-75f10e1d115428b94fb845e93bb001c3b48f10c6.tar drakx-75f10e1d115428b94fb845e93bb001c3b48f10c6.tar.gz drakx-75f10e1d115428b94fb845e93bb001c3b48f10c6.tar.bz2 drakx-75f10e1d115428b94fb845e93bb001c3b48f10c6.tar.xz drakx-75f10e1d115428b94fb845e93bb001c3b48f10c6.zip |
reformat keyboard2full_xkb()
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/keyboard.pm | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm index b70da0746..f01433a04 100644 --- a/perl-install/keyboard.pm +++ b/perl-install/keyboard.pm @@ -524,25 +524,22 @@ sub parse_xkb_rules() { sub keyboard2full_xkb { my ($keyboard) = @_; - my $XkbLayout = keyboard2xkb($keyboard) or return { XkbDisable => '' }; + my $Layout = keyboard2xkb($keyboard) or return { XkbDisable => '' }; + if ($keyboard->{GRP_TOGGLE} && $Layout !~ /,/) { + $Layout = join(',', 'us', $Layout); + } - my $XkbModel = $keyboard->{XkbModel} || + my $Model = $keyboard->{XkbModel} || (arch() =~ /sparc/ ? 'sun' : - $XkbLayout eq 'jp' ? 'jp106' : - $XkbLayout eq 'br' ? 'abnt2' : 'pc105'); - - { - XkbLayout => - $XkbLayout =~ /,/ ? $XkbLayout : - join(',', if_($keyboard->{GRP_TOGGLE}, 'us'), $XkbLayout), - XkbModel => $XkbModel, - XkbOptions => join(',', - if_($keyboard->{GRP_TOGGLE}, - "grp:$keyboard->{GRP_TOGGLE}", - 'grp_led:scroll'), - if_($keyboard->{GRP_TOGGLE} ne 'rwin_toggle', 'compose:rwin'), - ), - }; + $Layout eq 'jp' ? 'jp106' : + $Layout eq 'br' ? 'abnt2' : 'pc105'); + + my $Options = join(',', + if_($keyboard->{GRP_TOGGLE}, "grp:$keyboard->{GRP_TOGGLE}", 'grp_led:scroll'), + if_($keyboard->{GRP_TOGGLE} ne 'rwin_toggle', 'compose:rwin'), + ); + + { XkbModel => $Model, XkbLayout => $Layout, XkbOptions => $Options }; } sub xmodmap_file { |