diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2000-07-31 19:17:23 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2000-07-31 19:17:23 +0000 |
commit | 69dd828cf65886ada7ede22c495d14f84c8c593a (patch) | |
tree | 0cbd9edf9a6453e9b8c7d7eb9618dfee54ea8c9f /perl-install/standalone | |
parent | 1fcb9d98f6f5069c77db9769993a77936f7d4519 (diff) | |
download | drakx-backup-do-not-use-69dd828cf65886ada7ede22c495d14f84c8c593a.tar drakx-backup-do-not-use-69dd828cf65886ada7ede22c495d14f84c8c593a.tar.gz drakx-backup-do-not-use-69dd828cf65886ada7ede22c495d14f84c8c593a.tar.bz2 drakx-backup-do-not-use-69dd828cf65886ada7ede22c495d14f84c8c593a.tar.xz drakx-backup-do-not-use-69dd828cf65886ada7ede22c495d14f84c8c593a.zip |
no_comment
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/keyboarddrake | 10 | ||||
-rwxr-xr-x | perl-install/standalone/mousedrake | 11 |
2 files changed, 19 insertions, 2 deletions
diff --git a/perl-install/standalone/keyboarddrake b/perl-install/standalone/keyboarddrake index d2177b459..016202c68 100755 --- a/perl-install/standalone/keyboarddrake +++ b/perl-install/standalone/keyboarddrake @@ -33,6 +33,8 @@ my $xkb = keyboard::keyboard2xkb($keyboard); `setxkbmap $xkb`; my $f = "/etc/X11/XF86Config"; +my $g = "/etc/X11/XF86Config-4"; + substInFile { if (/^Section "Keyboard"/ .. /^EndSection/) { s|^(\s*XkbLayout\s+).*|$1"$xkb"| @@ -41,6 +43,14 @@ substInFile { } } $f if -e $f && !$::testing; +substInFile { + if (/^Identifier "Keyboard1"/ .. /^EndSection/) { + s|^(\s*Option\s+"XkbLayout"\s+).*|$1"$xkb"| + and $_ .= join '', map { /(\S+)(.*)/; qq( Option "$1" $2\n) } @{$xkb_options{$xkb} || []}; + s,^(\s*Option\s+"(XkbVariant|XkbOptions)"\s+).*,,; # remove existing one + } +} $g if -e $g && !$::testing; + keyboard::write('', $keyboard, $isNotDelete); $in->exit(0); diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake index d40bcff62..2b646e334 100755 --- a/perl-install/standalone/mousedrake +++ b/perl-install/standalone/mousedrake @@ -47,17 +47,24 @@ my $g = "/etc/X11/XF86Config-4"; my $zaxis = "\n ZAxisMapping 4 5" if $mouse->{nbuttons} > 3; $zaxis .= "\n ZAxisMapping 6 7" if $mouse->{nbuttons} > 5; + $zaxis = " + Emulate3Buttons + Emulate3Timeout 50" if $mouse->{nbuttons} < 3; + substInFile { if (/^Section "Pointer"/ .. /^EndSection/) { - $_ = '' if /ZAxisMapping/; #- remove existing line + $_ = '' if /(ZAxisMapping|Emulate3)/; #- remove existing line s|^(\s*Protocol\s+).*|$1"$mouse->{XMOUSETYPE}"|; s|^(\s*Device\s+).*|$1"/dev/mouse"$zaxis|; } } $f if -e $f && !$::testing; + +$zaxis =~ s/(ZAxisMapping|Emulate3\w+)/Option "$1"/g; substInFile { if (/^Identifier "Mouse1"/ .. /^EndSection/) { + $_ = '' if /(ZAxisMapping|Emulate3)/; #- remove existing line s|^(\s*Option\s+"Protocol"\s+).*|$1"$mouse->{XMOUSETYPE}"|; - s|^(\s*Option\s+"Device"\s+).*|$1"/dev/mouse"|; + s|^(\s*Option\s+"Device"\s+).*|$1"/dev/mouse"$zaxis|; } } $g if -e $g && !$::testing; |