keyboard/altgr: import weur layout from xorg us symbols
[sheet.git] / tools / mkkeyboard-xkb-symbols
index a7049fa4a0eb8516090efe783454cfe957367e9a..ba65b7a3b2cfa20e6f034d57fab46b8ce97ac3c2 100755 (executable)
@@ -3,10 +3,11 @@ use 5.014;
 use warnings;
 use utf8;
 use re '/msx';
+use open IO => ':encoding(utf-8)', ':std';
 use JSON ();
 use Data::Dump 'pp';
 
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 
 my $symname = eval {
        open my $keysymh, '<', 'data/keysymdef.json' or die $!;
@@ -88,7 +89,7 @@ while (readline) {
                #$res{$pos}[$shift] = $symname->{$chr} // $chr; # geochar
        }
 }
-say pp \%res;
+say pp(\%res) =~ s/(?<=") \\x \{? ([0-9A-F]{2,6}) \}?/chr hex $1/reg;
 
 __END__