meta access to several extended commands (trunk only)

Someone in the newsgroup has a keyboard where typing '#' is difficult
or impossible to do, and mentioned that he could use Alt+r to get #rub but
was playing a knight and had no way to get #ride.  Turns out that there
are several normal-mode extended commands that lacked a meta shortcut.
Since meta chars are case sensitive, I've added Alt+R for #ride, plus
M-A for #annotate, M-O for #overview, M-C for #conduct, and M-T for #tip.

     Unfortunately, I've been unable to test them.  It turns out that
nethack mode in PuTTY doesn't change the Alt key into a meta shift, it
causes the digits on the number pad to send vi-style movement letters
(with support for shift+digit and ctrl+digit to send modified letters).
That seems relatively useless to me, and I haven't figured out how to
force on high bit for arbitrary characters so can't activate nethack's
meta-key shortcuts.

     The Guidebook has been updated via copy+paste and is untested too.
This commit is contained in:
nethack.rankin
2009-10-20 22:48:38 +00:00
parent d69f078b7e
commit e8ca39ff07
5 changed files with 45 additions and 4 deletions
+6 -1
View File
@@ -13,7 +13,7 @@
^T Teleport around level ^T Teleport around level
^V Teleport between levels (available in debug mode only) ^V Teleport between levels (available in debug mode only)
^W Wish (available in debug mode only) ^W Wish (available in debug mode only)
^X Show your attributes (intrinsic ones included in debug or explore mode) ^X Show your attributes (shows more in debug or explore mode)
^Z Suspend game (only if defined) ^Z Suspend game (only if defined)
a Apply (use) a tool a Apply (use) a tool
A Remove all armor A Remove all armor
@@ -101,7 +101,9 @@ $ Count your gold
M-? Display extended command help (if the platform allows this) M-? Display extended command help (if the platform allows this)
M-2 Toggle two-weapon combat (unless number_pad is enabled) M-2 Toggle two-weapon combat (unless number_pad is enabled)
M-a Adjust inventory letters M-a Adjust inventory letters
M-A Annotate: supply a name for the current dungeon level (if supported)
M-c Talk to someone M-c Talk to someone
M-C Conduct: list voluntary challenges you have maintained
M-d Dip an object into something M-d Dip an object into something
M-e Advance or check weapons skills M-e Advance or check weapons skills
M-f Force a lock M-f Force a lock
@@ -111,11 +113,14 @@ M-l Loot a box on the floor
M-m Use a monster's special ability M-m Use a monster's special ability
M-n Name a monster, an individual object, or a type of object M-n Name a monster, an individual object, or a type of object
M-o Offer a sacrifice to the gods M-o Offer a sacrifice to the gods
M-O Overview: show a summary of the explored dungeon (if supported)
M-p Pray to the gods for help M-p Pray to the gods for help
M-q Quit M-q Quit
M-r Rub a lamp M-r Rub a lamp
M-R Ride: mount or dismount a saddled steed (if supported)
M-s Sit down M-s Sit down
M-t Turn undead M-t Turn undead
M-T Tip: empty a container
M-u Untrap something (trap, door, or chest) M-u Untrap something (trap, door, or chest)
M-v Print compile time options for this version of NetHack M-v Print compile time options for this version of NetHack
M-w Wipe off your face M-w Wipe off your face
+10
View File
@@ -756,8 +756,12 @@ can be used in this fashion.
#twoweapon (unless the number_pad option is enabled) #twoweapon (unless the number_pad option is enabled)
.lp M-a .lp M-a
#adjust #adjust
.lp M-A
#annotate (if supported)
.lp M-c .lp M-c
#chat #chat
.lp M-C
#conduct
.lp M-d .lp M-d
#dip #dip
.lp M-e .lp M-e
@@ -776,16 +780,22 @@ can be used in this fashion.
#name #name
.lp M-o .lp M-o
#offer #offer
.lp M-O
#overview (if supported)
.lp M-p .lp M-p
#pray #pray
.lp M-q .lp M-q
#quit #quit
.lp M-r .lp M-r
#rub #rub
.lp M-R
#ride (if supported)
.lp M-s .lp M-s
#sit #sit
.lp M-t .lp M-t
#turn #turn
.lp M-T
#tip
.lp M-u .lp M-u
#untrap #untrap
.lp M-v .lp M-v
+16 -1
View File
@@ -33,7 +33,7 @@
\begin{document} \begin{document}
% %
% input file: guidebook.mn % input file: guidebook.mn
% $Revision: 1.108 $ $Date: 2009/05/10 16:33:53 $ % $Revision: 1.109 $ $Date: 2009/10/18 23:52:34 $
% %
%.ds h0 " %.ds h0 "
%.ds h1 %.ds h2 \% %.ds h1 %.ds h2 \%
@@ -1011,9 +1011,15 @@ the `Alt' key can be used in this fashion.
\item[\tb{M-a}] \item[\tb{M-a}]
{\tt\#adjust} {\tt\#adjust}
%.lp %.lp
\item[\tb{M-A}]
{\tt\#annotate} (if supported)
%.lp
\item[\tb{M-c}] \item[\tb{M-c}]
{\tt\#chat} {\tt\#chat}
%.lp %.lp
\item[\tb{M-C}]
{\tt\#conduct}
%.lp
\item[\tb{M-d}] \item[\tb{M-d}]
{\tt\#dip} {\tt\#dip}
%.lp %.lp
@@ -1041,6 +1047,9 @@ the `Alt' key can be used in this fashion.
\item[\tb{M-o}] \item[\tb{M-o}]
{\tt\#offer} {\tt\#offer}
%.lp %.lp
\item[\tb{M-O}]
{\tt\#overview} (if supported)
%.lp
\item[\tb{M-p}] \item[\tb{M-p}]
{\tt\#pray} {\tt\#pray}
%.Ip %.Ip
@@ -1050,12 +1059,18 @@ the `Alt' key can be used in this fashion.
\item[\tb{M-r}] \item[\tb{M-r}]
{\tt\#rub} {\tt\#rub}
%.lp %.lp
\item[\tb{M-R}]
{\tt\#ride} (if supported)
%.lp
\item[\tb{M-s}] \item[\tb{M-s}]
{\tt\#sit} {\tt\#sit}
%.lp %.lp
\item[\tb{M-t}] \item[\tb{M-t}]
{\tt\#turn} {\tt\#turn}
%.lp %.lp
\item[\tb{M-T}]
{\tt\#tip}
%.lp
\item[\tb{M-u}] \item[\tb{M-u}]
{\tt\#untrap} {\tt\#untrap}
%.lp %.lp
+2 -1
View File
@@ -358,7 +358,7 @@ X11: added support for hilite_pet to text map mode
General New Features General New Features
-------------------- --------------------
burying a punishment ball no longer ends your punishment burying a punishment ball no longer ends your punishment
#tip command--pay a modest gratuity #tip command (with M-T shortcut) to empty a container's contents onto floor
add clicklook option to allow looking at things on the display by clicking add clicklook option to allow looking at things on the display by clicking
right mouse button when floating mouse pointer over them right mouse button when floating mouse pointer over them
Izchak's lighting store is now able to stock oil for your lamp Izchak's lighting store is now able to stock oil for your lamp
@@ -445,6 +445,7 @@ eating disenchanter corpses is now considered risky
make '[' command more precise when poly'd hero has embedded dragon scales/mail make '[' command more precise when poly'd hero has embedded dragon scales/mail
fainting while wielding a cockatrice corpse will be fatal fainting while wielding a cockatrice corpse will be fatal
Sunsword's light radius depends on its curse/bless state Sunsword's light radius depends on its curse/bless state
Add M-C and M-R meta-key shortcuts for #conduct and #ride, respectively
Platform- and/or Interface-Specific New Features Platform- and/or Interface-Specific New Features
+11 -1
View File
@@ -1,5 +1,4 @@
/* NetHack 3.5 cmd.c $Date$ $Revision$ */ /* NetHack 3.5 cmd.c $Date$ $Revision$ */
/* SCCS Id: @(#)cmd.c 3.5 2009/01/28 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -2132,10 +2131,14 @@ static const struct func_tab cmdlist[] = {
{'a', FALSE, doapply}, {'a', FALSE, doapply},
{'A', FALSE, doddoremarm}, {'A', FALSE, doddoremarm},
{M('a'), TRUE, doorganize}, {M('a'), TRUE, doorganize},
#ifdef DUNGEON_OVERVIEW
{M('A'), TRUE, donamelevel}, /* #annotate */
#endif
/* 'b', 'B' : go sw */ /* 'b', 'B' : go sw */
{'c', FALSE, doclose}, {'c', FALSE, doclose},
{'C', TRUE, docallcmd}, {'C', TRUE, docallcmd},
{M('c'), TRUE, dotalk}, {M('c'), TRUE, dotalk},
{M('C'), TRUE, doconduct}, /* #conduct */
{'d', FALSE, dodrop}, {'d', FALSE, dodrop},
{'D', FALSE, doddrop}, {'D', FALSE, doddrop},
{M('d'), FALSE, dodip}, {M('d'), FALSE, dodip},
@@ -2165,6 +2168,9 @@ static const struct func_tab cmdlist[] = {
{'o', FALSE, doopen}, {'o', FALSE, doopen},
{'O', TRUE, doset}, {'O', TRUE, doset},
{M('o'), FALSE, dosacrifice}, {M('o'), FALSE, dosacrifice},
#ifdef DUNGEON_OVERVIEW
{M('O'), TRUE, dooverview}, /* #overview */
#endif
{'p', FALSE, dopay}, {'p', FALSE, dopay},
{'P', FALSE, doputon}, {'P', FALSE, doputon},
{M('p'), TRUE, dopray}, {M('p'), TRUE, dopray},
@@ -2174,12 +2180,16 @@ static const struct func_tab cmdlist[] = {
{'r', FALSE, doread}, {'r', FALSE, doread},
{'R', FALSE, doremring}, {'R', FALSE, doremring},
{M('r'), FALSE, dorub}, {M('r'), FALSE, dorub},
#ifdef STEED
{M('R'), FALSE, doride}, /* #ride */
#endif
{'s', TRUE, dosearch, "searching"}, {'s', TRUE, dosearch, "searching"},
{'S', TRUE, dosave}, {'S', TRUE, dosave},
{M('s'), FALSE, dosit}, {M('s'), FALSE, dosit},
{'t', FALSE, dothrow}, {'t', FALSE, dothrow},
{'T', FALSE, dotakeoff}, {'T', FALSE, dotakeoff},
{M('t'), TRUE, doturn}, {M('t'), TRUE, doturn},
{M('T'), FALSE, dotip}, /* #tip */
/* 'u', 'U' : go ne */ /* 'u', 'U' : go ne */
{'u', FALSE, dountrap}, /* if number_pad is on */ {'u', FALSE, dountrap}, /* if number_pad is on */
{M('u'), FALSE, dountrap}, {M('u'), FALSE, dountrap},