From bc2b52c9d089d2455287f110733e851f6a067ed5 Mon Sep 17 00:00:00 2001 From: Stefan Siegel Date: Tue, 28 Aug 2001 17:16:09 +0000 Subject: - 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). --- perl-install/ChangeLog | 6 ++++++ perl-install/keyboard.pm | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 + + * 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 * 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. } -- cgit v1.2.1