4 title => 'nethack cheat sheet',
7 "Keyboard overview sheet for the Nethack console RPG game,",
8 "describing the default controls.",
11 nethack rogue game control controls sheet reference overview keyboard
13 stylesheet => [qw( light dark circus mono red )],
18 <h1>NetHack cheat sheet</h1>
20 <h2>normal gameplay</h2>
23 use Shiar_Sheet::Keyboard 2;
24 my $info = do 'nethack.eng.inc.pl' or die $@;
25 my $keys = Shiar_Sheet::Keyboard->new($info);
26 $_->{"\e"} = ['me mode'] for values %{ $info->{def} };
27 # static reset button, even though it's not (officially) in the game
28 $keys->map($get{map}) or undef $get{map};
29 $keys->print_rows($get{rows} || '4321-421', [3,2,1,0]);
36 <: $keys->print_legend('legend-types', ['g2' .. 'g4', 'g6' .. 'g8']) :>
40 <: $keys->print_legend('legend-options', [qw( arg argi argm )]) :>
42 <ul class="legend legend-set">
43 <li>keyboard <strong>map</strong> is
44 <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
45 <li><strong>keys</strong> are
46 <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
47 !exists $get{keys} && ' by default' :>
48 <li>default <strong>style</strong> is
49 <:= defined $get{style} && 'set to ' :><em><:= $style :></em>