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 /perl-install/keyboard.pm | |
parent | 8fa4652973bcd1e2eaabed250df104d0b40de209 (diff) | |
download | drakx-backup-do-not-use-bc2b52c9d089d2455287f110733e851f6a067ed5.tar drakx-backup-do-not-use-bc2b52c9d089d2455287f110733e851f6a067ed5.tar.gz drakx-backup-do-not-use-bc2b52c9d089d2455287f110733e851f6a067ed5.tar.bz2 drakx-backup-do-not-use-bc2b52c9d089d2455287f110733e851f6a067ed5.tar.xz drakx-backup-do-not-use-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).
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r-- | perl-install/keyboard.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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. } |