#!/usr/bin/perl use lib ".."; use c; my $KMAP_MAGIC = 0x8B39C07F; BEGIN { @ARGV == 1 or die "usage: kmap2bkmap \n" } system("sudo loadkeys $ARGV[0]") == 0 or die; open F, "dumpkeys -n -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 () { 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; den' name='id' value='cb838bffba30450e9fc101b6e50a7f293cdeb986'/> Mageia Installer and base platform for many utilitiesThierry Vignaud [tv]
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnne Nicolas <ennael@mageia.org>2011-12-11 23:51:34 +0000
committerAnne Nicolas <ennael@mageia.org>2011-12-11 23:51:34 +0000
commitcb838bffba30450e9fc101b6e50a7f293cdeb986 (patch)
treec16512bbd9f8e5155270f859b81d18be99013abb /perl-install/install/NEWS
parent409be6c6254766773f5fb353f0ec2bb903976279 (diff)
downloaddrakx-cb838bffba30450e9fc101b6e50a7f293cdeb986.tar
drakx-cb838bffba30450e9fc101b6e50a7f293cdeb986.tar.gz
drakx-cb838bffba30450e9fc101b6e50a7f293cdeb986.tar.bz2
drakx-cb838bffba30450e9fc101b6e50a7f293cdeb986.tar.xz
drakx-cb838bffba30450e9fc101b6e50a7f293cdeb986.zip
fix version
Diffstat (limited to 'perl-install/install/NEWS')