X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/c2f9c9e9c05d8639e4d968efd26c393fcf6da1f1..58bb00f2e06da0544fd08253bd62d939c4bb60a1:/keyboard.plp
diff --git a/keyboard.plp b/keyboard.plp
index 8bbe8f7..7689af5 100644
--- a/keyboard.plp
+++ b/keyboard.plp
@@ -7,6 +7,21 @@ my $info = eval { Data($include) } || {};
warn "error in $include: ", @{$@} if ref $@;
$mode = $info->{title} // $mode;
+my $showkeys //= !exists $get{keys} ? undef :
+ ($get{keys} ne '0' && ($get{keys} || 'always'));
+my @keystyle = (
+ '',
+ '',
+ !$showkeys ? '' :
+ $showkeys eq 'ghost' ? '' : (),
+ '',
+);
+if ($include =~ /^altgr/ and open my $cssinc, '<', 'keyboard-altgr.css') {
+ local $/;
+ my $data = readline $cssinc;
+ push @keystyle, "";
+}
+
Html({
title => "\L$mode\E keyboard cheat sheet",
version => $info->{version} || '0.1',
@@ -16,8 +31,8 @@ Html({
sheet cheat reference overview keyboard control commands shortkey
'],
stylesheet => [qw( light dark circus mono red )],
- keys => 1,
data => ["$include.inc.pl"],
+ raw => \@keystyle,
});
%{$info} or Abort(