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

View File

@@ -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},