diff options
author | Mystery Man <unknown@mandriva.org> | 2002-07-18 10:15:29 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2002-07-18 10:15:29 +0000 |
commit | 700529a81000e551676a591369fc7c9ea13a1a33 (patch) | |
tree | cf19449afbd0ef4f2b12faffa7657a38ab578b99 /perl-install/share/kmap2bkmap | |
parent | 1f295b1f8bfe64f293a79900161b085a37009dee (diff) | |
download | drakx-backup-do-not-use-700529a81000e551676a591369fc7c9ea13a1a33.tar drakx-backup-do-not-use-700529a81000e551676a591369fc7c9ea13a1a33.tar.gz drakx-backup-do-not-use-700529a81000e551676a591369fc7c9ea13a1a33.tar.bz2 drakx-backup-do-not-use-700529a81000e551676a591369fc7c9ea13a1a33.tar.xz drakx-backup-do-not-use-700529a81000e551676a591369fc7c9ea13a1a33.zip |
This commit was manufactured by cvs2svn to create tag 'V1_1_8_6mdk'.V1_1_8_6mdk
Diffstat (limited to 'perl-install/share/kmap2bkmap')
-rwxr-xr-x | perl-install/share/kmap2bkmap | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/perl-install/share/kmap2bkmap b/perl-install/share/kmap2bkmap deleted file mode 100755 index 3aff35c3e..000000000 --- a/perl-install/share/kmap2bkmap +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl - -use lib ".."; -use c; - -my $KMAP_MAGIC = 0x8B39C07F; - -BEGIN { @ARGV == 1 or die "usage: kmap2bkmap <keymap>\n" } - -system("sudo loadkeys $ARGV[0]") == 0 or die; -open F, "dumpkeys -n -f |"; -<F> =~ /^keymaps\s+(.*)/ or die; -foreach (split ',', $1) { - my @l = /(\d+)-(\d+)/; - my ($i, $j) = @l ? @l : ($_,$_); - $keymaps[$_] = 1 foreach $i .. $j; -} - -print pack("I", $KMAP_MAGIC); -print map { pack "i", $keymaps[$_] || 0 } 0 .. c::MAX_NR_KEYMAPS()-1; - -foreach (<F>) { - s/\+0x/0x/g; - my ($keycode, $key, undef, @l) = split; - $keycode eq 'keycode' or next; - my $i = 0; - $L[$i++][$key] = hex $_ foreach @l; -} -close F or die "dumpkeys failed"; - -foreach (@L) { - foreach my $i (0 .. c::NR_KEYS()-1) { - print pack "s", defined $_->[$i] ? $_->[$i] : 0x200; - } -} - -exit 0; |