summaryrefslogtreecommitdiffstats
path: root/perl-install/keyboard.pm
diff options
context:
space:
mode:
authorStew Benedict <stewb@mandriva.org>2001-07-27 14:27:03 +0000
committerStew Benedict <stewb@mandriva.org>2001-07-27 14:27:03 +0000
commitea4e11187b9a5acdb4a0e29280393ba7d97e3bad (patch)
tree31379683db0af3ffae65b63b8fcdecc7ffa50097 /perl-install/keyboard.pm
parent2e594437945bbec328351bffd6775a1af5e16430 (diff)
downloaddrakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar
drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.gz
drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.bz2
drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.tar.xz
drakx-backup-do-not-use-ea4e11187b9a5acdb4a0e29280393ba7d97e3bad.zip
last of sync with PPC beta mods
Diffstat (limited to 'perl-install/keyboard.pm')
-rw-r--r--perl-install/keyboard.pm14
1 files changed, 12 insertions, 2 deletions
diff --git a/perl-install/keyboard.pm b/perl-install/keyboard.pm
index 0e14b7a71..82d3346a4 100644
--- a/perl-install/keyboard.pm
+++ b/perl-install/keyboard.pm
@@ -224,7 +224,7 @@ sub keyboard2kmap { $keyboards{$_[0]} && $keyboards{$_[0]}[1] }
sub keyboard2xkb { $keyboards{$_[0]} && $keyboards{$_[0]}[2] }
sub loadkeys_files {
- my $archkbd = arch() =~ /^sparc/ ? "sun" : arch() =~ /i.86/ ? "i386" : arch();
+ my $archkbd = arch() =~ /^sparc/ ? "sun" : arch() =~ /i.86/ ? "i386" : arch() =~ /ppc/ ? "mac" : arch();
my $p = "/usr/lib/kbd/keymaps/$archkbd";
my $post = ".kmap.gz";
my %trans = ("cz-latin2" => "cz-lat2");
@@ -304,7 +304,17 @@ sub xmodmap_file {
}
sub setup {
- return if arch() =~ /^sparc|ppc/;
+ return if arch() =~ /^sparc/;
+
+ #- Xpmac doesn't map keys quite right
+ if (arch() =~ /ppc/ && !$::testing && $ENV{DISPLAY}) {
+ log::l("Fixing Mac keyboard");
+ run_program::run('xmodmap', "-e", "keycode 59 = BackSpace" );
+ run_program::run('xmodmap', "-e", "keycode 131 = Shift_R" );
+ run_program::run('xmodmap', "-e", "add shift = Shift_R" );
+ return;
+ }
+
my ($keyboard) = @_;
my $o = $keyboards{$keyboard} or return;