12 return JSON->new->utf8->decode(readline);
13 } or die "Could not read keyboard layout data: $@\n";
15 my $geochar = do './keyspos.inc.pl'
16 or die "Could not read keyboard position names: $@\n";
18 if (($info->{moderows} // '') =~ /4/) {
19 push @{$_}, map {"+$_"} @{$_} for values %{$geochar};
22 my ($name) = $ARGV =~ m{.*/([^.]+)};
23 say "// setxkbmap -print $name | xkbcomp -w0 -I.. - \$DISPLAY";
26 say sprintf 'xkb_symbols "%s" {', $info->{title};
27 for my $k (sort keys %{$geochar}) {
28 printf "\tkey <%s> {[%s]};\n", $k, join(', ',
29 map { !$_ ? 'NoSymbol' : sprintf 'U%04X', ord }
30 map { $info->{key}->{$_} } @{ $geochar->{$k} }
37 mkxkbsymbols - Export keyboard layout metadata as Xorg symbols
41 tools/mkxkbsymbols data/keyboard/altgr/$NAME.eng.json >$NAME
42 setxkbmap -print $NAME | xkbcomp -w0 -I.. - $DISPLAY
46 Converts site includes (back) to I<xkb_symbols> configurations
47 compatible with C<xkbcomp> so it can be used in Xorg.
51 Mischa POSLAWSKY <perl@shiar.org>
55 Licensed under the GNU Affero General Public License version 3.