X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/c2f9c9e9c05d8639e4d968efd26c393fcf6da1f1..26a71f36c68773b18095911e99be7294cbd66f39:/keyboard.plp diff --git a/keyboard.plp b/keyboard.plp index 8bbe8f7..4a49ebb 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -7,6 +7,16 @@ 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' ? '' : (), + '', +); + Html({ title => "\L$mode\E keyboard cheat sheet", version => $info->{version} || '0.1', @@ -16,8 +26,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(