diff options
author | Stefan Siegel <siegel@linux-mandrake.com> | 2001-08-28 17:16:09 +0000 |
---|---|---|
committer | Stefan Siegel <siegel@linux-mandrake.com> | 2001-08-28 17:16:09 +0000 |
commit | bc2b52c9d089d2455287f110733e851f6a067ed5 (patch) | |
tree | 8bd61186a3976c84905335112f03e2bd4fd545c7 | |
parent | 8fa4652973bcd1e2eaabed250df104d0b40de209 (diff) | |
download | drakx-bc2b52c9d089d2455287f110733e851f6a067ed5.tar drakx-bc2b52c9d089d2455287f110733e851f6a067ed5.tar.gz drakx-bc2b52c9d089d2455287f110733e851f6a067ed5.tar.bz2 drakx-bc2b52c9d089d2455287f110733e851f6a067ed5.tar.xz drakx-bc2b52c9d089d2455287f110733e851f6a067ed5.zip |
- 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).
-rw-r--r-- | perl-install/ChangeLog | 6 | ||||
-rw-r--r-- | perl-install/keyboard.pm | 5 |
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. } |