-sub escapeclass {
- local $_ = shift;
- s/\^/_c/g;
- s/\[/_sbo/g;
- s/\]/_sbc/g;
- s/^$/_/;
- return $_;
-}
-
-sub print_key {
- my ($mode, $key, $keyinfo) = @_;
-
- $keyinfo = [ $sign{alias}.$keyinfo, keyunalias($keyinfo)->[1] . ' alias' ]
- if defined $keyinfo and not ref $keyinfo; # alias
- my ($desc, $flags, $mnem) = @$keyinfo if defined $keyinfo;
- defined $desc or $flags = $key eq '^0' ? 'ni' : 'no';
-
- my $keytxt = $mode . Entity($key) if $key ne '^0';
- $keytxt .= $sign{arg} while $flags =~ s/ ?\barg\b//; # argument
- $keytxt .= "<small>$sign{motion}</small>" if $flags =~ s/ ?\bargm\b//; # motion argument
- $keytxt =~ s{\^(?=.)}{<small>^</small>}; # element around ctrl-identifier
- my $onclick = $flags =~ s/ ?\bmode(\S*)// && defined $keys{$1} && sprintf(
- ' onclick="setmode(%s)"',
- $1 eq '' ? '' : sprintf(q{'mode%s'}, escapeclass($1))
- );
- my $keyhint = defined($mnem) && qq{ title="$mnem"};
-
- print qq{\t\t<li class="$flags"$onclick><b$keyhint>$keytxt</b>};
- print ' ', $desc if defined $desc;
- print "\n";
-}
-
-our $map = defined $keyrows{$get{map}} ? $get{map} : 'qwerty';
-my $keyrows = $keyrows{$map};
-
-for (my $row = 0; $row <= $#$keyrows; $row++) {
- my $keyrow = $keyrows->[$row];
- print qq{<li class="row row$row"><ul>\n};
- while (my ($mode, $modekeys) = each %keys) {
- for (my $case = 0; $case <= $#$keyrow; $case++) {
- my $keycase = $keyrow->[$case];
- @$keycase or next;
-
- printf(qq{\t<li%s><h3>%s</h3>\n}, # XXX insert here to fix msie<=6
- $mode ne '' && sprintf(
- ' class="%s"', 'mode mode' . escapeclass($mode)
- ),
- sprintf('%s<small>: %s</small>',
- $modekeys->{desc} || "mode $mode",
- "$rowdesc[$row] row $casedesc[$case]"
- )
- );
- my $modeclass = 'keys';
- $modeclass .= ' lead' if defined $modekeys->{lead}; # leading command key shown
- $modeclass .= " $casedesc[$case]" if defined $casedesc[$case];
- print qq{\t\t<ul class="$modeclass">\n};
- print_key($modekeys->{lead}, $_, $modekeys->{$_}) for @$keycase;
- print qq{\t\t</ul>\n};
- } # case
-
- } # mode
- print qq{\t</ul>\n};
-} # row
+<p>
+Through the miracle of formatting, design, abbreviation, compression, and Perl,
+the following topics have been condensed into single pages of reference.
+<br>
+Originally created by Mischa <span style="font-variant:small-caps">Poslawsky</span>,
+but you're free to use, print, alter, and redistribute under the AGPL license.
+</p>