X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/fe3830a0e28e28ea18335cc81af2faac447fc69a..26a71f36c68773b18095911e99be7294cbd66f39:/keyboard.plp diff --git a/keyboard.plp b/keyboard.plp index 36ccaca..4a49ebb 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -1,11 +1,22 @@ <(common.inc.plp)><: -my $mode = lc($Request || 'keyboard'); +my $mode = lc($Request || 'altgr'); my $include = "$mode.eng"; 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', @@ -15,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( @@ -32,6 +43,34 @@ say "