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 charset => $sign{charset},
14 stylesheet => [qw'light dark circus mono red terse'],
19 <h1>NetHack cheat sheet</h1>
21 <h2>normal gameplay</h2>
24 use Shiar_Sheet::Keyboard 2;
25 my $info = do 'nethack.eng.inc.pl' or die $@;
26 $info->{def} = do 'nethack.inc.pl';
27 my $keys = Shiar_Sheet::Keyboard->new($info);
28 $_->{"\e"} = ['me mode'] for values %{ $info->{def} };
29 # static reset button, even though it's not (officially) in the game
30 $keys->map($get{map}) or undef $get{map};
31 $keys->print_rows($get{rows} || '4321-421', [3,2,1,0]);
38 <dl class="legend legend-types">
39 <dt class="pm">direction
40 <dd>Direction to move to or target a command (<:= $sign{motion} :>).
42 <dd>Other character movement.
44 <dd>Direct action command: takes a turn.
46 <dd>Informational command: shows/does something without ending the turn.
47 <dt class="mo">invertory
48 <dd>Display invertory menu.
50 <dd>Enters some other menu.
55 <dl class="legend legend-options">
56 <dt>key<:= $sign{arg} :>
57 <dd>Commands with a dot need at least one argument afterwards.
58 <dt>key<:= $sign{argi} :>
59 <dd>Asks for an inventory item.
60 <dt>key<:= $sign{argm} :>
61 <dd>Requires a direction afterwards.
64 <ul class="legend legend-set">
65 <li>keyboard <strong>map</strong> is
66 <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
67 <li><strong>ascii</strong> mode is
68 <:= defined $sign{-ascii} && 'forced ' :><em><:=
69 $sign{-ascii} ? 'on' : 'off' :></em>
70 <li><strong>keys</strong> are
71 <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
72 !exists $get{keys} && ' by default' :>
73 <li>default <strong>style</strong> is
74 <:= defined $get{style} && 'set to ' :><em><:= $style :></em>