summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-08-30 12:17:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-08-30 12:17:19 +0000
commit4edd598855aab2f9cc29c30f3a83342aac384dfe (patch)
treee1db63fdbdc0859362e87d6e0585f0a306d70eaa
parent252887bbb4a9bdc2e5ecbb6e5aa760b387abe85d (diff)
downloaddrakx-4edd598855aab2f9cc29c30f3a83342aac384dfe.tar
drakx-4edd598855aab2f9cc29c30f3a83342aac384dfe.tar.gz
drakx-4edd598855aab2f9cc29c30f3a83342aac384dfe.tar.bz2
drakx-4edd598855aab2f9cc29c30f3a83342aac384dfe.tar.xz
drakx-4edd598855aab2f9cc29c30f3a83342aac384dfe.zip
most of the code of Xconfig::default::config_keyboard moved to keyboard::keyboard2full_xkb
-rw-r--r--perl-install/Xconfig/default.pm15
-rw-r--r--perl-install/keyboard.pm17
2 files changed, 18 insertions, 14 deletions
diff --git a/perl-install/Xconfig/default.pm b/perl-install/Xconfig/default.pm
index e9e4abd35..e1cd2e1b8 100644
--- a/perl-install/Xconfig/default.pm
+++ b/perl-install/Xconfig/default.pm
@@ -37,20 +37,7 @@ sub config_mouse {
sub config_keyboard {
my ($raw_X, $keyboard) = @_;
-
- my $XkbLayout = keyboard::keyboard2xkb($keyboard);
-
- my $XkbModel =
- arch() =~ /sparc/ ? 'sun' :
- $XkbLayout eq 'jp' ? 'jp106' :
- $XkbLayout eq 'br' ? 'abnt2' : 'pc105';
-
- my $xkb = { $XkbLayout ? (
- XkbLayout => $XkbLayout,
- XkbModel => $XkbModel,
- if_($keyboard->{GRP_TOGGLE}, XkbOptions => "grp:$keyboard->{GRP_TOGGLE}"),
- ) : (XkbDisable => undef) };
- $raw_X->set_keyboard($xkb);
+ $raw_X->set_keyboard(keyboard::keyboard2full_xkb($keyboard));
}
1;
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 5ede5c53d..b2db204fd 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -390,6 +390,23 @@ sub load {
#- log::l("loaded $count keymap tables");
}
+sub keyboard2full_xkb {
+ my ($keyboard) = @_;
+
+ my $XkbLayout = keyboard2xkb($keyboard);
+
+ my $XkbModel =
+ arch() =~ /sparc/ ? 'sun' :
+ $XkbLayout eq 'jp' ? 'jp106' :
+ $XkbLayout eq 'br' ? 'abnt2' : 'pc105';
+
+ $XkbLayout ? {
+ XkbLayout => $XkbLayout,
+ XkbModel => $XkbModel,
+ XkbOptions => $keyboard->{GRP_TOGGLE} ? "grp:$keyboard->{GRP_TOGGLE}" : undef,
+ } : { XkbDisable => undef };
+}
+
sub xmodmap_file {
my ($keyboard) = @_;
my $KEYBOARD = $keyboard->{KEYBOARD};