Source:NetHack 5.0.0/dat/keyhelp
Jump to navigation
Jump to search
Below is the full text to keyhelp from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/dat/keyhelp#line12]], for example.
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. Depending upon hardware or operating system or NetHack's interface, 2. some keystrokes may be off-limits. 3. 4. For example, ^S and ^Q are often used for XON/XOFF flow-control, 5. meaning that ^S suspends output and subsequent ^Q resumes suspended 6. output. When that is the case, neither of those characters will 7. reach NetHack when it is waiting for a command keystroke. So they 8. aren't used as commands, but 'whatdoes' might not be able to tell 9. you that if they don't get passed through to NetHack. 10. 11. ^M or <return> or <enter> is likely to be transformed into ^J or 12. <linefeed> or 'newline' before being passed to NetHack for handling. 13. So it isn't used as a command, and 'whatdoes' might seem as if it 14. is reporting the wrong character but will be operating correctly if 15. it describes ^J when you type ^M. 16. 17. A NUL character, which is typed as ^<space> on some keyboards, 18. ^@ on others, and maybe not typeable at all on yet others, is not 19. used as a command, and will be converted into ESC before reaching 20. 'whatdoes'. Unlike ^M, this transformation is performed within 21. NetHack. But like ^M, if you type NUL and get feedback about ESC, 22. the situation is expected. 23. 24. ESC itself is a synonym for ^[, and is another source of oddity. 25. Various function keys, including cursor arrow keys, may transmit 26. an "escape sequence" of ESC + [ + other stuff, confusing NetHack 27. as to what command was intended since the ESC will be processed 28. and then whatever follows will seem to NetHack like--and be used 29. as--something typed by the user. (If you press a function key and 30. a menu of the armor your hero is wearing appears, what happened 31. was that an escape sequence was sent to NetHack, its ESC aborted 32. any pending key operation, its '[' was then treated as a command 33. to show worn armor, and the "other stuff" probably got silently 34. discarded as invalid choices while you dismissed the menu.) 35. 36. If you have NetHack's 'altmeta' option enabled, meaning that the 37. <alt> or <option> key, when used as shift while typing some other 38. character, transmits ESC and then the other character so NetHack 39. should treat that other character as a meta-character, then ESC 40. takes on added potential for confusion. Implicit in the handling 41. of a two character sequence ESC + something is the fact that when 42. NetHack sees ESC, it needs to wait for another character before 43. it can decide what to do. So if you type ESC manually, you'll 44. need to type it a second time or NetHack will sit there waiting. 45. (It will then be treated as if you typed ESC rather than M-ESC.) 46. 47. On some systems, typing ^\ will send a QUIT signal to the current 48. process, probably killing it and possibly causing it to save a 49. core dump. It is not used for any NetHack command, so don't type 50. that character. 51. 52. One last note: characters shown as ^x mean that you should hold 53. down the <control> or <ctrl> key as a shift and then type 'x'. 54. Control characters are all implicitly uppercase, but you don't 55. need to press the shift key while typing them. The opposite is 56. true for meta-characters: they can be either case, so you need 57. to use shift as well as <meta> or <alt> to generate an uppercase 58. letter meta-character.