summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-10-15 13:59:46 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-10-15 13:59:46 +0000
commit1aec68c262a3ba595d7153f15d0419f5b3083394 (patch)
tree9d9d50bebad45276bb56d2cc37a4733e4120d964
parent33a75dde718cf7af5d12240c708ddfe05261deda (diff)
downloaddrakx-backup-do-not-use-1aec68c262a3ba595d7153f15d0419f5b3083394.tar
drakx-backup-do-not-use-1aec68c262a3ba595d7153f15d0419f5b3083394.tar.gz
drakx-backup-do-not-use-1aec68c262a3ba595d7153f15d0419f5b3083394.tar.bz2
drakx-backup-do-not-use-1aec68c262a3ba595d7153f15d0419f5b3083394.tar.xz
drakx-backup-do-not-use-1aec68c262a3ba595d7153f15d0419f5b3083394.zip
move setxkbmap to keyboard.pm
-rw-r--r--perl-install/keyboard.pm7
-rwxr-xr-xperl-install/standalone/keyboarddrake5
2 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 7176af4a7..4fdde31b7 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -447,6 +447,13 @@ sub xmodmap_file {
-e $f && $f;
}
+sub setxkbmap {
+ my ($keyboard) = @_;
+ my $xkb = keyboard::keyboard2full_xkb($keyboard) or return;
+ run_program::rooted($::prefix, 'setxkbmap', '-option', '') if $xkb->{XkbOptions}; #- need re-initialised other toggles are cumulated
+ run_program::rooted($::prefix, 'setxkbmap', $xkb->{XkbLayout}, '-model' => $xkb->{XkbModel}, '-option' => $xkb->{XkbOptions} || '', '-compat' => $xkb->{XkbCompat} || '');
+}
+
sub setup {
my ($keyboard) = @_;
diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake
index ac49132a5..c45d70a34 100755
--- a/perl-install/standalone/keyboarddrake
+++ b/perl-install/standalone/keyboarddrake
@@ -34,11 +34,10 @@ if ($::expert) {
$keyboard->{BACKSPACE} = $isNotDelete ? "BackSpace" : "Delete";
}
-my $xkb = keyboard::keyboard2full_xkb($keyboard);
-system('setxkbmap', '-option', '') if $xkb->{XkbOptions}; #- need re-initialised other toggles are cumulated
-system('setxkbmap', $xkb->{XkbLayout}, '-model' => $xkb->{XkbModel}, '-option' => $xkb->{XkbOptions} || '', '-compat' => $xkb->{XkbCompat} || '');
+keyboard::setxkbmap($keyboard);
eval {
my $xfree_conf = Xconfig::xfree->read;
+ my $xkb = keyboard::keyboard2full_xkb($keyboard);
$xfree_conf->set_keyboard($xkb);
$xfree_conf->write;
};