3 my $mode = lc($Request || 'altgr');
4 my $include = "$mode.eng";
6 my $info = eval { Data($include) } || {};
7 $mode = $info->{title} // $mode;
10 title => "\L$mode\E keyboard cheat sheet",
11 version => $info->{version} || '0.1',
12 description => $info->{description} //
13 ["Keyboard cheat sheet for the default controls of $mode."],
14 keywords => [@{ $info->{keywords} // [] }, qw'
15 sheet cheat reference overview keyboard control commands shortkey
17 stylesheet => [qw( light dark circus mono red )],
19 data => ["$include.inc.pl"],
23 "Requested keyboard <q>$mode</q> not available",
24 '404 request not found',
27 say "<h1>$mode cheat sheet</h1>";
28 say "<p>$_</p>" for $info->{intro} // ();
29 say "<h2>", $info->{mode}->{''}, " (default)</h2>"
30 if $info->{mode} and %{ $info->{mode} } > 1;
32 use Shiar_Sheet::Keyboard 2.08;
33 my $keys = Shiar_Sheet::Keyboard->new($info);
34 $keys->map($get{map}) or undef $get{map};
35 $keys->print_rows($get{rows}, $info->{rows});
36 $keys->print_legends(\%get);