summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog6
-rw-r--r--perl-install/keyboard.pm5
2 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 6521ed544..9245a6ffc 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -1,3 +1,9 @@
+2001/08/28 Stefan Siegel <siegel@mandrakesoft.com>
+
+ * keyboard.pm: write DISABLE_WINDOWS_KEY=no in /etc/sysconfig/keyboard
+ if no laptop is detected (= give users the chance to know about
+ the existence of this variable).
+
2001/08/28 dam's <damien@mandrakesoft.com>
* mouse.pm: typo
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 381affeb7..066e32ea1 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -228,6 +228,7 @@ arch() eq "ppc" ? (
)),
);
+my $disable_windows_key = (detect_devices::isLaptop() ? "yes" : "no");
#-######################################################################################
#- Functions
@@ -360,7 +361,7 @@ sub write {
setVarsInSh("$prefix/etc/sysconfig/keyboard", { KEYTABLE => keyboard2kmap($keyboard),
KBCHARSET => $charset,
REMOVE_MOD_META_L => "",
- DISABLE_WINDOWS_KEY => detect_devices::isLaptop() ? "yes" : "",
+ DISABLE_WINDOWS_KEY => $disable_windows_key,
BACKSPACE => $isNotDelete ? "BackSpace" : "Delete" });
run_program::rooted($prefix, "dumpkeys > /etc/sysconfig/console/default.kmap") or log::l("dumpkeys failed");
}
@@ -369,6 +370,8 @@ sub read {
my ($prefix) = @_;
my %keyf = getVarsFromSh("$prefix/etc/sysconfig/keyboard");
my $keytable = $keyf{KEYTABLE};
+ # If not yet defined in the file, check if we are a laptop:
+ $disable_windows_key = ($keyf{DISABLE_WINDOWS_KEY}) || (detect_devices::isLaptop() ? "yes" : "no");
keyboard2kmap($_) eq $keytable and return $_ foreach keys %keyboards;
$keyboards{$keytable} && $keytable; #- keep track of unknown keyboard.
}