From: PatR Date: Sun, 5 Jun 2016 08:09:52 +0000 (-0700) Subject: 'whatdoes' command and new file: dat/keyhelp X-Git-Tag: NetHack-3.6.1_RC01~700 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ef23c6ac48ca99cf5ee0a7f1f8d4df784d775ff;p=nethack 'whatdoes' command and new file: dat/keyhelp Make the whatdoes ('&' or '?f') command support the 'altmeta' option for meta-characters generated by two character seqeunce 'ESC char'. Also, make it be more descriptive when reporting "no such command" by including the numeric value it operated on when failing to match any command. That might provide a way for us to get some extra information when players report problems with odd keystrokes: we ask them to type such at the "what command?" prompt and then tell us what numbers come up. It's been given a help file to deal with assorted idiosyncracies which can come up when querying what keys do. Unfortunately that ended up being way more verbose than intended. Installation of the extra data file has only been done for Unix. Other platforms will get "can't open file" if they respond with '&' or '?' to the "what command?" prompt. The command will still work though, just without the extra text. --- diff --git a/Files b/Files index 919d50808..8c3a948d0 100644 --- a/Files +++ b/Files @@ -12,13 +12,13 @@ dat: (files for all versions) Arch.des Barb.des Caveman.des Healer.des Knight.des Monk.des Priest.des Ranger.des Rogue.des Samurai.des -Tourist.des Valkyrie.des Wizard.des bigroom.des castle.des -cmdhelp data.base dungeon.def endgame.des gehennom.des -help hh history knox.des license -medusa.des mines.des opthelp oracle.des oracles.txt -quest.txt rumors.fal rumors.tru sokoban.des symbols -tower.des wizhelp yendor.des tribute bogusmon.txt -engrave.txt epitaph.txt +Tourist.des Valkyrie.des Wizard.des bigroom.des bogusmon.txt +castle.des cmdhelp data.base dungeon.def endgame.des +engrave.txt epitaph.txt gehennom.des help hh +history keyhelp knox.des license medusa.des +mines.des opthelp oracle.des oracles.txt quest.txt +rumors.fal rumors.tru sokoban.des symbols tower.des +tribute wizhelp yendor.des doc: (files for all versions) diff --git a/dat/keyhelp b/dat/keyhelp new file mode 100644 index 000000000..41ab37ef1 --- /dev/null +++ b/dat/keyhelp @@ -0,0 +1,58 @@ + Depending upon hardware or operating system or NetHack's interface, + some keystrokes may be off-limits. + + For example, ^S and ^Q are often used for XON/XOFF flow-control, + meaning that ^S suspends output and subsequent ^Q resumes suspended + output. When that it the case, neither of those characters will + reach NetHack when it is waiting for a command keystroke. So they + aren't used as commands, but 'whatdoes' might not be able to tell + you that if they don't get passed through to NetHack. + + ^M or or is likely to be transformed into ^J or + or 'newline' before being passed to NetHack for handling. + So it isn't used as a command, and 'whatdoes' might seem as if it + is reporting the wrong character but will be operating correctly if + it describes ^J when you type ^M. + + A NUL character, typed as ^ on some keyboards, ^@ on others, + and maybe not typeable at all on yet others. It is not used as a + command, and will be converted into ESC before reaching 'whatdoes'. + Unlike ^M, this transformation is performed by NetHack itself. + But like ^M, if you type NUL and get feedback about ESC, the + situation is expected. + + ESC itself is a synonym for ^[, and is another source of oddity. + Various function keys, including cursor arrow keys, may transmit + an "escape sequence" of ESC + [ + other stuff, confusing NetHack + as to what command was intended since the ESC will be processed + and then whatever follows will seem to NetHack like--and be used + as--something typed by the user. (If you press a function key and + a menu of the armor your hero is wearing appears, what happened + was that an escape sequence was sent to NetHack, its ESC aborted + any pending key operation, its '[' was then treated as a command + to show worn armor, and the "other stuff" probably got silently + discarded as invalid choices while you dismissed the menu.) + + If you have NetHack's 'altmeta' option enabled, meaning that the + or