5 $file = "maps/serial.map";
7 open(PC
, $file) || die("$!");
10 if(/^\s*keycode\s+(\d+)\s*=\s*(\S+)/)
14 if(defined($map{uc($sym)}))
16 # print STDERR "$file:$line: warning: `$sym' redefined\n";
18 $map{uc($sym)} = $idx;
24 $file = "maps/fixup.map";
26 open(FIXUP
, $file) || die("$!");
29 if(/^\s*keycode\s+(\d+)\s*=\s*/)
32 for $sym (split(/\s+/, $'))
34 $map{uc($sym)} = $idx;
41 $file = "maps/usb.map";
43 open(USB, $file) || die("$!");
46 if(/^\s*keycode\s+(\d+)\s*=\s*/)
49 for $sym (split(/\s+/, $'))
51 my($val) = $map{uc($sym)};
55 print STDERR
"$file:$line: warning: `$sym' undefined\n";
67 print "unsigned char usb_kbd_map[256] = \n{\n";
68 for($x = 0; $x < 32; $x++)
75 for($y = 0; $y < 8; $y++)
77 my($idx) = $x * 8 + $y;
78 print sprintf(" 0x%02x,",
79 int(defined($map[$idx]) ?
$map[$idx]:0));