4 use Shiar_Sheet::KeySigns qw(%sign);
6 $header{content_type} = "text/html; charset=$sign{charset}";
8 :><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
9 "http://www.w3.org/TR/html4/loose.dtd">
13 <meta http-equiv="content-type" content="<:= $header{content_type} :>">
14 <title>nethack cheat sheet</title>
15 <meta name="description" content="Keyboard functionality overview sheet for the Nethack console RPG game.">
16 <meta name="keywords" content="nethack, rogue, game, control, controls, sheet, reference, overview, keyboard">
17 <:= stylesheet(qw'light dark circus mono red terse') :>
18 <!--[if lte IE 6]><style> .help dl.legend dt {margin:0 0 1px} </style><![endif]-->
19 <!--[if lte IE 7]><style> .help dl.legend dd {float:none} </style><![endif]--><:
20 our $showkeys = exists $get{keys} && $get{keys} ne '0';
21 print "\n".'<style type="text/css"> .no {visibility:hidden} </style>'
23 print "\n".'<style type="text/css"> .no, .alias {opacity:.5} </style>'
24 if $showkeys and $get{keys} eq 'ghost';
26 <link rel="icon" type="image/png" href="/clip.png">
27 <script type="text/javascript" src="/keys.js"></script>
31 <h1>NetHack cheat sheet</h1>
33 <h2>normal gameplay</h2>
38 <ul class="keys omni">
39 <li class="me chr27" onclick="setmode()"><b>Esc</b>
40 <!-- static reset button, even though it's not (officially) in the game -->
45 use Shiar_Sheet::Keyboard;
46 my $keys = Shiar_Sheet::Keyboard->new({do 'nethack.inc.pl'});
47 $keys->map($get{map}) or undef $get{map};
48 $keys->print_rows($get{rows} || '4321-421', [3,2,1,0]);
56 <dl class="legend legend-types">
57 <dt class="pm">direction
58 <dd>Direction to move to or target a command (<:= $sign{motion} :>).
60 <dd>Other character movement.
62 <dd>Direct action command: takes a turn.
64 <dd>Informational command: shows/does something without ending the turn.
65 <dt class="mo">invertory
66 <dd>Display invertory menu.
68 <dd>Enters some other menu.
73 <dl class="legend legend-options">
74 <dt>key<:= $sign{arg} :>
75 <dd>Commands with a dot need at least one argument afterwards.
76 <dt>key<:= $sign{argi} :>
77 <dd>Asks for an inventory item.
78 <dt>key<:= $sign{argm} :>
79 <dd>Requires a direction afterwards.
82 <ul class="legend legend-set">
83 <li>keyboard <strong>map</strong> is
84 <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
85 <li><strong>ascii</strong> mode is
86 <:= defined $sign{-ascii} && 'forced ' :><em><:=
87 $sign{-ascii} ? 'on' : 'off' :></em>
88 <li><strong>keys</strong> are
89 <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
90 !exists $get{keys} && ' by default' :>
91 <li>default <strong>style</strong> is
92 <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
98 <a href="/" rel="home">sheet.shiar.nl</a>/nethack.<a href="/source/nethack.plp"
99 rel="code" title="Written in Perl">plp</a>
100 <a href="http://git.shiar.nl/sheet.git/history/HEAD:/nethack.plp"
101 rel="vcs-git" title="Git repository"><:= $VERSION :></a>
102 created by <a href="http://shiar.nl/" rel="author">Shiar</a> <:= $sign{sep} :>
103 <a href="http://www.fsf.org/licensing/licenses/agpl-3.0.html" rel="copyright"
104 title="Licensed under the GNU Affero General Public License, version 3">AGPLv3</a>