git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sc: lotv patch v5.0.13 (2024-03-26)
[sheet.git]
/
keyboard
/
altgr
/
index.inc.plp
diff --git
a/keyboard/altgr/index.inc.plp
b/keyboard/altgr/index.inc.plp
index 74c53dda0cf48a305bd58fc3a4707bc4943f9211..bf11415b5928f68105d7b39e718c570a1e08288b 100644
(file)
--- a/
keyboard/altgr/index.inc.plp
+++ b/
keyboard/altgr/index.inc.plp
@@
-8,7
+8,7
@@
my $indexfile = "$dirbase/index";
Html({
title => "altgr keyboard cheat sheets",
Html({
title => "altgr keyboard cheat sheets",
- version => '1.
2
',
+ version => '1.
3
',
description => [
"Overview of alternate keyboard modes,",
"offering extended Unicode characters if a modifier key",
description => [
"Overview of alternate keyboard modes,",
"offering extended Unicode characters if a modifier key",
@@
-18,7
+18,6
@@
Html({
sheet cheat reference overview keyboard altgr option
'],
image => "$dirbase/thumb/ibm-m.jpg",
sheet cheat reference overview keyboard altgr option
'],
image => "$dirbase/thumb/ibm-m.jpg",
- stylesheet => [qw( light dark circus mono red )],
data => ["$dirbase/index.inc.plp", "$indexfile.inc.pl"],
raw => <<'.',
<style>
data => ["$dirbase/index.inc.plp", "$indexfile.inc.pl"],
raw => <<'.',
<style>
@@
-111,7
+110,9
@@
img {
:>
<h1>Extended keyboards</h1>
:>
<h1>Extended keyboards</h1>
-<p>Overview of available key layouts with AltGr or similar modifier keys.</p>
+<p>Overview of available key layouts with AltGr or similar modifier keys.
+Also see <a href="/digraphs">digraphs</a> for compose key combinations.
+</p>
<:
my $idx = Data($indexfile);
<:
my $idx = Data($indexfile);
@@
-120,6
+121,7
@@
push @incs, @{ $idx->{$_} } for @{ $idx->{default} };
my @sample = split /(?<!\+)/, $get{sample} // 'asSci1!+1';
require Shiar_Sheet::Keyboard;
my @sample = split /(?<!\+)/, $get{sample} // 'asSci1!+1';
require Shiar_Sheet::Keyboard;
+Shiar_Sheet::Keyboard->VERSION(3.00);
use List::Util qw( uniq max sum );
my %caticon = (
use List::Util qw( uniq max sum );
my %caticon = (
@@
-136,7
+138,9
@@
if (@sample) {
print "<th>$_" for @sample;
say '</tr></thead>';
}
print "<th>$_" for @sample;
say '</tr></thead>';
}
-my $most = max(map { sum values %{ $_->{inventory}{''} } } %{$idx}{@incs});
+my $most = max(
+ map { sum values %{$_} } map { $_->{inventory}{''} } @{$idx}{@incs}
+);
for my $inc (@incs) {
my $table = $idx->{$inc};
print @sample ? '<tr><th>' : '<figure>';
for my $inc (@incs) {
my $table = $idx->{$inc};
print @sample ? '<tr><th>' : '<figure>';
@@
-156,7
+160,8
@@
for my $inc (@incs) {
print '</a>', "\n\t";
for my $mode ($table->{mode} ? sort keys %{ $table->{mode} } : '') {
print '<span class=graph>';
print '</a>', "\n\t";
for my $mode ($table->{mode} ? sort keys %{ $table->{mode} } : '') {
print '<span class=graph>';
- printf '<label>%s</label>', s/\s.*//r for $table->{key}{$mode} || ();
+ printf "<label>%s</label>", m/^(\S*)/
+ for $mode && $table->{mode}{$mode} || ();
for my $g (sort keys %{ $table->{inventory}{$mode} }) {
printf '<span class="%s" style="width:%.0f%%" title="%3$d %4$s"> %s</span>',
$g, $_/$most*100, $_,
for my $g (sort keys %{ $table->{inventory}{$mode} }) {
printf '<span class="%s" style="width:%.0f%%" title="%3$d %4$s"> %s</span>',
$g, $_/$most*100, $_,
@@
-168,14
+173,19
@@
for my $inc (@incs) {
say '</span>';
}
print "\t<td class=ni>";
say '</span>';
}
print "\t<td class=ni>";
- print join ' ', map { $caticon{$_} // () } split m{/}, $table->{category} // '';
+ print join ' ', map { $caticon{$_} // () }
+ split m{/}, $table->{category} // '';
say '';
if (my $keys = eval {
my $keydata = Data("$dirbase/$inc.eng");
Shiar_Sheet::Keyboard->new($keydata)
}) {
say '';
if (my $keys = eval {
my $keydata = Data("$dirbase/$inc.eng");
Shiar_Sheet::Keyboard->new($keydata)
}) {
- $keys->print_key('', $_, ($keys->{def}{''}{$_} // 'ni') =~ s/ mode\S*//r)
- for @sample;
+ for my $c (@sample) {
+ my $def = $keys->{def}{''}{$c} // [];
+ $def->[0] //= 'ni';
+ $def->[0] =~ s/ mode\S*//;
+ $keys->print_key('', $c, $def);
+ }
}
say '</tr>';
}
}
say '</tr>';
}