From e8ca39ff0771110fa053302e4dd91071e7401945 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Tue, 20 Oct 2009 22:48:38 +0000 Subject: [PATCH] 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. --- dat/cmdhelp | 7 ++++++- doc/Guidebook.mn | 10 ++++++++++ doc/Guidebook.tex | 17 ++++++++++++++++- doc/fixes35.0 | 3 ++- src/cmd.c | 12 +++++++++++- 5 files changed, 45 insertions(+), 4 deletions(-) diff --git a/dat/cmdhelp b/dat/cmdhelp index 02d0e3474..b47beb84c 100644 --- a/dat/cmdhelp +++ b/dat/cmdhelp @@ -13,7 +13,7 @@ ^T Teleport around level ^V Teleport between levels (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) a Apply (use) a tool A Remove all armor @@ -101,7 +101,9 @@ $ Count your gold M-? Display extended command help (if the platform allows this) M-2 Toggle two-weapon combat (unless number_pad is enabled) 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 Conduct: list voluntary challenges you have maintained M-d Dip an object into something M-e Advance or check weapons skills 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-n Name a monster, an individual object, or a type of object 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-q Quit M-r Rub a lamp +M-R Ride: mount or dismount a saddled steed (if supported) M-s Sit down M-t Turn undead +M-T Tip: empty a container M-u Untrap something (trap, door, or chest) M-v Print compile time options for this version of NetHack M-w Wipe off your face diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 788597331..a1c17507e 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -756,8 +756,12 @@ can be used in this fashion. #twoweapon (unless the number_pad option is enabled) .lp M-a #adjust +.lp M-A +#annotate (if supported) .lp M-c #chat +.lp M-C +#conduct .lp M-d #dip .lp M-e @@ -776,16 +780,22 @@ can be used in this fashion. #name .lp M-o #offer +.lp M-O +#overview (if supported) .lp M-p #pray .lp M-q #quit .lp M-r #rub +.lp M-R +#ride (if supported) .lp M-s #sit .lp M-t #turn +.lp M-T +#tip .lp M-u #untrap .lp M-v diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index fdd039643..e12e8a9a2 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -33,7 +33,7 @@ \begin{document} % % 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 h1 %.ds h2 \% @@ -1011,9 +1011,15 @@ the `Alt' key can be used in this fashion. \item[\tb{M-a}] {\tt\#adjust} %.lp +\item[\tb{M-A}] +{\tt\#annotate} (if supported) +%.lp \item[\tb{M-c}] {\tt\#chat} %.lp +\item[\tb{M-C}] +{\tt\#conduct} +%.lp \item[\tb{M-d}] {\tt\#dip} %.lp @@ -1041,6 +1047,9 @@ the `Alt' key can be used in this fashion. \item[\tb{M-o}] {\tt\#offer} %.lp +\item[\tb{M-O}] +{\tt\#overview} (if supported) +%.lp \item[\tb{M-p}] {\tt\#pray} %.Ip @@ -1050,12 +1059,18 @@ the `Alt' key can be used in this fashion. \item[\tb{M-r}] {\tt\#rub} %.lp +\item[\tb{M-R}] +{\tt\#ride} (if supported) +%.lp \item[\tb{M-s}] {\tt\#sit} %.lp \item[\tb{M-t}] {\tt\#turn} %.lp +\item[\tb{M-T}] +{\tt\#tip} +%.lp \item[\tb{M-u}] {\tt\#untrap} %.lp diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 5e2c68362..615b450ac 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -358,7 +358,7 @@ X11: added support for hilite_pet to text map mode General New Features -------------------- 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 right mouse button when floating mouse pointer over them 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 fainting while wielding a cockatrice corpse will be fatal 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 diff --git a/src/cmd.c b/src/cmd.c index 28180092f..b9a832105 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,5 +1,4 @@ /* NetHack 3.5 cmd.c $Date$ $Revision$ */ -/* SCCS Id: @(#)cmd.c 3.5 2009/01/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2132,10 +2131,14 @@ static const struct func_tab cmdlist[] = { {'a', FALSE, doapply}, {'A', FALSE, doddoremarm}, {M('a'), TRUE, doorganize}, +#ifdef DUNGEON_OVERVIEW + {M('A'), TRUE, donamelevel}, /* #annotate */ +#endif /* 'b', 'B' : go sw */ {'c', FALSE, doclose}, {'C', TRUE, docallcmd}, {M('c'), TRUE, dotalk}, + {M('C'), TRUE, doconduct}, /* #conduct */ {'d', FALSE, dodrop}, {'D', FALSE, doddrop}, {M('d'), FALSE, dodip}, @@ -2165,6 +2168,9 @@ static const struct func_tab cmdlist[] = { {'o', FALSE, doopen}, {'O', TRUE, doset}, {M('o'), FALSE, dosacrifice}, +#ifdef DUNGEON_OVERVIEW + {M('O'), TRUE, dooverview}, /* #overview */ +#endif {'p', FALSE, dopay}, {'P', FALSE, doputon}, {M('p'), TRUE, dopray}, @@ -2174,12 +2180,16 @@ static const struct func_tab cmdlist[] = { {'r', FALSE, doread}, {'R', FALSE, doremring}, {M('r'), FALSE, dorub}, +#ifdef STEED + {M('R'), FALSE, doride}, /* #ride */ +#endif {'s', TRUE, dosearch, "searching"}, {'S', TRUE, dosave}, {M('s'), FALSE, dosit}, {'t', FALSE, dothrow}, {'T', FALSE, dotakeoff}, {M('t'), TRUE, doturn}, + {M('T'), FALSE, dotip}, /* #tip */ /* 'u', 'U' : go ne */ {'u', FALSE, dountrap}, /* if number_pad is on */ {M('u'), FALSE, dountrap}, -- 2.40.0