Difference between revisions of "Commands"

From NetHackWiki
Jump to navigation Jump to search
(Move game control commands into a new table)
(Moved Equiptment, Skills & Inventory commands to a new table)
Line 25: Line 25:
  
 
{|class="wikitable" style="text-align: center;"
 
{|class="wikitable" style="text-align: center;"
|+ Numpad
+
|+ Numpad<sup>†</sup>
 
| {{kbd|Numpad 7}} || || {{kbd|Numpad 8}} || || {{kbd|Numpad 9}}
 
| {{kbd|Numpad 7}} || || {{kbd|Numpad 8}} || || {{kbd|Numpad 9}}
 
|-
 
|-
Line 36: Line 36:
 
| {{kbd|Numpad 1}} || || {{kbd|Numpad 2}} || || {{kbd|Numpad 3}}
 
| {{kbd|Numpad 1}} || || {{kbd|Numpad 2}} || || {{kbd|Numpad 3}}
 
|}
 
|}
Available ony if [[number_pad]] option need to be '''enabled'''.
+
(<sup>†</sup>)Available ony if [[number_pad]] option is '''enabled'''.
  
 
==Commands==
 
==Commands==
Line 79: Line 79:
 
|[[^Z|Suspend]]
 
|[[^Z|Suspend]]
 
|#suspend
 
|#suspend
|{{kbd|ctrl|z}}
+
|{{kbd|Ctrl|z}}
 
|Suspend the game (UNIX(R) versions with job control only).
 
|Suspend the game (UNIX(R) versions with job control only).
 
|-
 
|-
|Message|| [[Repeat previous messages]] || #prevmsg ||{{kbd|ctrl|p}} || Show previously displayed game messages.
+
|Message|| [[Repeat previous messages]] || #prevmsg ||{{kbd|Ctrl|p}} || Show previously displayed game messages.
 
|-
 
|-
 
| rowspan="2" | Help on commands
 
| rowspan="2" | Help on commands
Line 269: Line 269:
 
|rowspan="2"|[[untrap]]
 
|rowspan="2"|[[untrap]]
 
|rowspan="2"|#untrap
 
|rowspan="2"|#untrap
|{{kbd|alt|u}}
+
|{{kbd|Meta|u}}
 
|rowspan="2"|Untrap something.
 
|rowspan="2"|Untrap something.
 
|-
 
|-
Line 276: Line 276:
  
  
 +
===In Game Status===
 +
{|class="prettytable"
 +
!Category
 +
!Action
 +
!Command
 +
!Key
 +
!Short Description
 +
|-
 +
|
 +
|[[Attributes|Character info]]
 +
|#attributes
 +
|{{kbd|Ctrl|x}}
 +
|Display basic information about your character.
 +
|-
 +
|
 +
|[[Conduct]]
 +
|#conduct
 +
|{{kbd|Meta|C}}
 +
|List which challenges you have adhered to.
 +
|-
 +
|rowspan="8"|Current equipment
 +
|
 +
|#seeall
 +
|{{kbd|*}}
 +
|Show all equipment in use.
 +
|-
 +
|[[Amulet]]
 +
|#seeamulet
 +
|{{kbd|"}}
 +
|Show currently worn amulet.
 +
|-
 +
|[[Armor]]
 +
|#seearmor
 +
|{{kbd|[}}
 +
|Show currently worn armor.
 +
|-
 +
|[[Gold]]
 +
|#seegold
 +
|{{kbd|$}}
 +
|Count your gold.
 +
|-
 +
|[[Ring]]
 +
|#seerings
 +
|{{kbd|{{=}}}}
 +
|Show currently worn ring(s).
 +
|-
 +
|[[Spellcasting]]
 +
|#seespells
 +
|{{kbd|+}}
 +
|List and reorder known spells.
 +
|-
 +
|[[Tool]]
 +
|#seetools
 +
|{{kbd|(}}
 +
|Show tools currently in use.
 +
|-
 +
|[[Weapon]]
 +
|#seeweapon
 +
|{{kbd|)}}
 +
|Show currently wielded weapons.
 +
|-
 +
|rowspan="2"|[[Discoveries]]
 +
|
 +
|#known
 +
|{{kbd|\}}
 +
|Show discovered objects.
 +
|-
 +
|
 +
|#knownclass
 +
|{{kbd|`}}
 +
|Show discovered objects of one type.
 +
|-
 +
|rowspan="4"|[[Dungeon]]
 +
|rowspan="2"|[[Overview]]
 +
|rowspan="2"|#overview
 +
|{{kbd|Meta|O}}
 +
|rowspan="2"|Display an overview of the dungeon.
 +
|-
 +
|{{kbd|Ctrl|o}}<sup>†</sup>
 +
|-
 +
|rowspan="2"|[[Annotate]]
 +
|rowspan="2"|#annotate
 +
|{{kbd|Meta|A}}
 +
|rowspan="2"|Leave a note about the level.
 +
|-
 +
|{{kbd|Ctrl|n}}<sup>†</sup>
 +
|}
  
 
+
===Equiptment, Skills & Inventory===
 
+
{|class="prettytable"
 
+
!Category
 
+
!Action
 
 
 
 
 
 
 
 
 
 
 
 
{|class="prettytable striped"
 
 
!Command
 
!Command
!Shortcuts
+
!Key
 
!Short Description
 
!Short Description
 
|-
 
|-
|[[adjust]]
+
|rowspan="11"|Equipment
|{{kbd|alt|a}}
+
|rowspan="2"|[[Twoweapon]]
|Adjust [[inventory]] letters.
+
|rowspan="2"|#twoweapon
 +
|{{kbd|X}}
 +
|rowspan="2"|Toggle two-weapon combat.
 +
|-
 +
|{{kbd|Meta|2}}<sup>††</sup>
 +
|-
 +
|[[Take off]]
 +
|#takeoffall
 +
|{{kbd|A}}
 +
|Remove all armor.
 +
|-
 +
|[[Put on]]
 +
|#puton
 +
|{{kbd|P}}
 +
|Put on an accessory.
 +
|-
 +
|[[Remove]]
 +
|#remove
 +
|{{kbd|R}}
 +
|Remove an accessory (ring, amulet, or blindfold).
 +
|-
 +
|[[Take off]]
 +
|#takeoff
 +
|{{kbd|T}}
 +
|Take off one piece of armor.
 +
|-
 +
|[[Wield]]
 +
|#wield
 +
|{{kbd|w}}
 +
|Wield a weapon.
 +
|-
 +
|[[Wear]]
 +
|#wear
 +
|{{kbd|W}}
 +
|Wear a piece of armor.
 
|-
 
|-
|[[annotate]]
+
|[[Swap weapons]]
|{{kbd|alt|A}}
+
|#swap
|Leave a note about the level.
+
|{{kbd|x}}
 +
|Swap wielded and secondary weapons.
 
|-
 
|-
|[[apply]]
+
|rowspan="2"|[[Apply]]
 +
|rowspan="2"|#apply
 
|{{kbd|a}}
 
|{{kbd|a}}
|Apply (use) a tool.
+
|Apply (use) a tool. If used on a wand, that wand will be broken, releasing its magic in the process.
 +
|-
 +
|{{kbd|m|a}}
 +
|{{kbd|m}} prefix skips items if the tool used acts on items on the floor
 
|-
 
|-
|[[attributes]]
+
|
|{{kbd|Ctrl|x}}
+
|[[Quiver]]
|Show your attributes.
+
|#quiver
 +
|{{kbd|Q}}
 +
|Select ammunition for quiver.
 +
|-
 +
|[[skill|Skills]]
 +
|[[Enhance]]
 +
|#enhance
 +
|{{kbd|Meta|e}}
 +
|Advance or check weapons skills.
 +
|-
 +
|rowspan="14"|[[Inventory]]
 +
|
 +
|#inventory
 +
|{{kbd|i}}
 +
|Show your inventory.
 +
|-
 +
|
 +
|#inventtype
 +
|{{kbd|I}}
 +
|List inventory by type.
 +
|-
 +
|
 +
|
 +
|{{kbd|I|*}}
 +
|List all gems in inventory.
 +
|-
 +
|
 +
|
 +
|{{kbd|I|u}}
 +
|List all unpaid items
 +
|-
 +
|
 +
|
 +
|{{kbd|I|x}}
 +
|List all used up items that are on your shopping bill
 +
|-
 +
|
 +
|
 +
|{{kbd|I|B}}
 +
|List all items known to be blessed
 +
|-
 +
|
 +
|
 +
|{{kbd|I|U}}
 +
|List all items known to be uncursed
 +
|-
 +
|
 +
|
 +
|{{kbd|I|C}}
 +
|List all items known to be cursed
 +
|-
 +
|
 +
|
 +
|{{kbd|I|X}}
 +
|List all items whose bless/curse status is unknown
 +
|-
 +
|
 +
|
 +
|{{kbd|I|$}}
 +
|Count your money.
 
|-
 
|-
 
+
|[[Call]]
|[[call]]
+
|#call
 
|{{kbd|C}}
 
|{{kbd|C}}
 
|Name a monster or object, or add an [[annotate|annotation]].
 
|Name a monster or object, or add an [[annotate|annotation]].
 +
|-
 +
|rowspan="2"|[[Name]]
 +
|rowspan="2"|#name
 +
|{{kbd|Meta|n}}
 +
|rowspan="2"|Name an [[item]] or type of object.
 +
|-
 +
|{{kbd|N}}<sup>†</sup>
 +
|-
 +
|[[Adjust]]
 +
|#adjust
 +
|{{kbd|Meta|a}}
 +
|Adjust inventory letters.
 +
|}
 +
 +
 +
{|class="prettytable striped"
 +
!Command
 +
!Shortcuts
 +
!Short Description
 +
 +
 +
 +
 +
 
|-
 
|-
  
Line 321: Line 523:
 
|{{kbd|c}}
 
|{{kbd|c}}
 
|Close a door.
 
|Close a door.
|-
+
 
|[[conduct]]
 
|{{kbd|alt|C}}
 
|List which challenges you have adhered to.
 
 
|-
 
|-
 
|[[dip]]
 
|[[dip]]
Line 343: Line 542:
 
|Eat something.
 
|Eat something.
  
|-
+
 
|[[enhance]]
 
|{{kbd|alt|e}}
 
|Advance or check weapons [[skill]]s.
 
  
  
Line 363: Line 559:
 
|{{kbd|V}}
 
|{{kbd|V}}
 
|Show long version and game history.
 
|Show long version and game history.
|-
+
 
|[[inventory]]
 
|{{kbd|i}}
 
|Show your inventory.
 
|-
 
|[[Inventory|inventtype]]
 
|{{kbd|I}}
 
|Inventory specific item types.
 
 
|-
 
|-
 
|[[invoke]]
 
|[[invoke]]
Line 380: Line 569:
 
|{{kbd|Ctrl|d}}, {{kbd|k}}<sup>†</sup>
 
|{{kbd|Ctrl|d}}, {{kbd|k}}<sup>†</sup>
 
|Kick something.
 
|Kick something.
|-
+
 
|[[Discoveries|known]]
 
|{{kbd|\}}
 
|Show discovered objects.
 
|-
 
|[[Discoveries|knownclass]]
 
|{{kbd|`}}
 
|Show discovered objects of one type.
 
  
 
|-
 
|-
Line 397: Line 579:
 
|{{kbd|alt|m}}
 
|{{kbd|alt|m}}
 
|Use a monster's special ability.
 
|Use a monster's special ability.
|-
+
 
|[[name]]
 
|{{kbd|alt|n}}, {{kbd|C}}, {{kbd|N}}<sup>†</sup>
 
|Name an [[item]] or type of object.
 
 
|-
 
|-
 
|[[offer]]
 
|[[offer]]
Line 413: Line 592:
 
|{{kbd|O}}
 
|{{kbd|O}}
 
|Show and change settings.
 
|Show and change settings.
|-
+
 
|[[overview]]
 
|{{kbd|alt|O}}, {{kbd|Ctrl|o}}
 
|Display an overview of the dungeon.
 
 
|-
 
|-
 
|[[Shop|pay]]
 
|[[Shop|pay]]
Line 429: Line 605:
 
|{{kbd|alt|p}}
 
|{{kbd|alt|p}}
 
|Pray to the gods for help.
 
|Pray to the gods for help.
|-
 
  
|[[Put on|puton]]
 
|{{kbd|P}}
 
|Put on an accessory.
 
 
|-
 
|-
 
|[[quaff]]
 
|[[quaff]]
Line 448: Line 620:
 
|{{kbd|Ctrl|r}}, {{kbd|Ctrl|l}}<sup>†</sup>
 
|{{kbd|Ctrl|r}}, {{kbd|Ctrl|l}}<sup>†</sup>
 
|Redraw the screen.
 
|Redraw the screen.
|-
+
 
|[[remove]]
 
|{{kbd|R}}
 
|Remove an accessory.
 
 
|-
 
|-
 
|[[ride]]
 
|[[ride]]
Line 461: Line 630:
 
|Rub a [[lamp]] or a [[stone]].
 
|Rub a [[lamp]] or a [[stone]].
  
|-
 
|seeall
 
|{{kbd|*}}
 
|Show all equipment in use.
 
|-
 
|[[Amulet|seeamulet]]
 
|{{kbd|"}}
 
|Show currently worn amulet.
 
|-
 
|[[Armor|seearmor]]
 
|{{kbd|[}}
 
|Show currently worn armor.
 
|-
 
|[[Gold|seegold]]
 
|{{kbd|$}}
 
|Count your gold.
 
|-
 
|[[Ring|seerings]]
 
|{{kbd|{{=}}}}
 
|Show currently worn ring(s).
 
|-
 
|[[Spellcasting|seespells]]
 
|{{kbd|+}}
 
|List and reorder known spells.
 
|-
 
|[[Tool|seetools]]
 
|{{kbd|(}}
 
|Show tools currently in use.
 
  
|-
 
|[[Weapon|seeweapon]]
 
|{{kbd|)}}
 
|Show currently wielded weapons.
 
 
|-
 
|-
 
|[[Shell escape|shell]]
 
|[[Shell escape|shell]]
Line 500: Line 637:
  
  
|-
+
 
|[[Swap weapons|swap]]
+
 
|{{kbd|x}}
+
 
|Swap wielded and secondary weapons.
 
|-
 
|[[Take off|takeoff]]
 
|{{kbd|T}}
 
|Take off one piece of armor.
 
|-
 
|[[Take off|takeoffall]]
 
|{{kbd|A}}
 
|Remove all armor.
 
  
 
|-
 
|-
Line 523: Line 651:
 
|Turn [[undead]].<ref>This command is related to the [[Dungeons and Dragons|D&D]] concept of "undead turning"; it does ''not'' cause your character to suddenly become an undead monster!</ref>
 
|Turn [[undead]].<ref>This command is related to the [[Dungeons and Dragons|D&D]] concept of "undead turning"; it does ''not'' cause your character to suddenly become an undead monster!</ref>
 
|-
 
|-
|[[twoweapon]]
 
|{{kbd|X}}, {{kbd|alt|2}}<sup>††</sup>
 
|Toggle two-weapon combat.
 
  
 
|-
 
 
|[[version]]
 
|[[version]]
 
|{{kbd|alt|v}}
 
|{{kbd|alt|v}}
Line 536: Line 659:
 
|{{kbd|v}}
 
|{{kbd|v}}
 
|Show version string.
 
|Show version string.
 +
  
 
|-
 
|-
|[[wear]]
 
|{{kbd|W}}
 
|Wear a piece of armor.
 
|-
 
  
  
|[[wield]]
+
 
|{{kbd|w}}
 
|Wield a weapon.
 
  
  
Line 555: Line 673:
 
(<sup>††</sup>) These keybindings are only  present when the [[number_pad]] option is '''disabled'''.
 
(<sup>††</sup>) These keybindings are only  present when the [[number_pad]] option is '''disabled'''.
  
<sup>†††</sup> Not supported on all platforms
+
(<sup>†††</sup>) Not supported on all platforms
  
 
==Wizard-mode commands==
 
==Wizard-mode commands==

Revision as of 14:58, 10 March 2022

This article is about commands. For a chart of keyboard keys and their uses, see Commands (by key).

In NetHack, a command is an action you want the game to perform. This includes actions your character might do, gathering information about your character or the game, or even modifying the behavior of the game itself.

In previous versions of NetHack, commands were separated into two main categories: normal commands, which predominantly were by default bound to single character keys, and extended commands, which were somewhat less common and either didn't have a default keybinding or were executed with a modifier key like alt or ctrl. These "extended commands" are entered by typing # and entering the command name.

NetHack 3.6.1 does not make a meaningful distinction between normal commands and extended commands, providing most normal commands with an "extended" form, and can be entered either by their respective keybinding or the extended way. 3.6.1 also adds the custom keybinding system, where players can arbitrarily re-bind commands to particular keys or key combinations. When setting these, the "extended" format command name is used. For more information see the binding keys main article.

When entering commands with the # prefix, some commands will autocomplete after only a few letters. This behavior can be modified with the AUTOCOMPLETE option.

Directional keys

Keyboard
y k u
h l
b j n
Numpad
Numpad 7 Numpad 8 Numpad 9
Numpad 4 Numpad 6
Numpad 1 Numpad 2 Numpad 3

()Available ony if number_pad option is enabled.

Commands

Here is a list of commands, their default keybinding, and a short description.

Meta Key

System Key
NT, OS/2, PC and ST Alt
Amiga Set altmeta option


Controls

Category Action Command Key Short Description
Cancel ESC
Redo last command Ctrl + a
Panic button Ctrl + c Quit the game.
Shell Commands Save #save S Save the game and exit.
Quit #quit Meta + q Exit without saving current game.
Suspend #suspend Ctrl + z Suspend the game (UNIX(R) versions with job control only).
Message Repeat previous messages #prevmsg Ctrl + p Show previously displayed game messages.
Help on commands #whatdoes & Tell what a key does.
#? Meta + ?††† Get the list of available extended commands.
Help, in game Help (in-game) #help ? Show the help menu.
h
What is #whatis / Show what type of a thing a symbol corresponds to.
Far look #glance ; Show what a map symbol means.
#therecmdmenu Show menu of possible actions in an adjacent location.[1]
In game options Explore mode #exploremode Enter non-scoring game exploring/discovery mode. Used for learning about the game.
Autopickup #autopickup @ Toggle autopickup on/off.
Terrain #terrain Show the map without monsters, objects, or traps.
Motion Direction keys Go one step in the direction indicated
Uppercase Direction keys Go in that direction until you hit a wall
m + Direction keys Move without picking up objects or fighting
M + Direction keys Move far, no pickup
g + Direction keys Move until something interesting is found.
G + Direction keys Same as g + Direction keys, but forking of corridors is not considered interesting.
Ctrl + Direction keys
Staircase #up < Go up a staircase.
#down > Go down a staircase.
Travel #travel _ Travel to a specific location on the map.
m + _ m prefix shows a menu of interesting targets in sight without asking to move the cursor.
Teleport #teleport Ctrl + t Teleport around the level, if you have the ability.
Jump #jump Meta + j Jump to a location.
j
Other actions Wipe #wipe Meta + w Wipe off your face.
Sit #sit Meta + s Sit down.
Rest #wait . Rest one move while doing nothing.
Space if rest_on_space is on.
Battle F + Direction keys Fight a monster (even if you only guess one is there).
Firing #fire f Fire ammunition from quiver.
Quiver #quiver Q Select ammunition for quiver.
Zap #zap z Zap a wand.
Spellcasting #cast Z Cast a spell.
Throw #throw t Throw something.
Explore Near look #look : Look at what is under you.
Search #search s Search for unseen things near you.
Engrave #engrave E Engrave writing on the floor.
Trap #seetrap ^ Show the type of an adjacent trap.
untrap #untrap Meta + u Untrap something.
u


In Game Status

Category Action Command Key Short Description
Character info #attributes Ctrl + x Display basic information about your character.
Conduct #conduct Meta + C List which challenges you have adhered to.
Current equipment #seeall * Show all equipment in use.
Amulet #seeamulet " Show currently worn amulet.
Armor #seearmor [ Show currently worn armor.
Gold #seegold $ Count your gold.
Ring #seerings = Show currently worn ring(s).
Spellcasting #seespells + List and reorder known spells.
Tool #seetools ( Show tools currently in use.
Weapon #seeweapon ) Show currently wielded weapons.
Discoveries #known \ Show discovered objects.
#knownclass ` Show discovered objects of one type.
Dungeon Overview #overview Meta + O Display an overview of the dungeon.
Ctrl + o
Annotate #annotate Meta + A Leave a note about the level.
Ctrl + n

Equiptment, Skills & Inventory

Category Action Command Key Short Description
Equipment Twoweapon #twoweapon X Toggle two-weapon combat.
Meta + 2††
Take off #takeoffall A Remove all armor.
Put on #puton P Put on an accessory.
Remove #remove R Remove an accessory (ring, amulet, or blindfold).
Take off #takeoff T Take off one piece of armor.
Wield #wield w Wield a weapon.
Wear #wear W Wear a piece of armor.
Swap weapons #swap x Swap wielded and secondary weapons.
Apply #apply a Apply (use) a tool. If used on a wand, that wand will be broken, releasing its magic in the process.
m + a m prefix skips items if the tool used acts on items on the floor
Quiver #quiver Q Select ammunition for quiver.
Skills Enhance #enhance Meta + e Advance or check weapons skills.
Inventory #inventory i Show your inventory.
#inventtype I List inventory by type.
I + * List all gems in inventory.
I + u List all unpaid items
I + x List all used up items that are on your shopping bill
I + B List all items known to be blessed
I + U List all items known to be uncursed
I + C List all items known to be cursed
I + X List all items whose bless/curse status is unknown
I + $ Count your money.
Call #call C Name a monster or object, or add an annotation.
Name #name Meta + n Name an item or type of object.
N
Adjust #adjust Meta + a Adjust inventory letters.


Command Shortcuts Short Description



chat alt + c Talk to someone.
close c Close a door.
dip alt + d Dip an object into something.
drop d Drop an item.
droptype D Drop specific item types.
eat e Eat something.



force alt + f Force a lock.
herecmdmenu Show a menu of possible actions in your current location.
history V Show long version and game history.
invoke alt + i Invoke an object's powers.
kick Ctrl + d, k Kick something.


loot alt + l, l Loot a box on the floor.
monster alt + m Use a monster's special ability.
offer alt + o Offer a sacrifice to the gods.
open o Open a door.
options O Show and change settings.
pay p Pay your shopping bill.
pickup , Pick up things at current location.
pray alt + p Pray to the gods for help.
quaff q Drink something.


read r Read a scroll, spellbook, or something else.
redraw Ctrl + r, Ctrl + l Redraw the screen.
ride alt + R Ride (or stop riding) a monster.
rub alt + r Rub a lamp or a stone.


shell ! Do a shell escape. (Disabled on most NetHack servers.)




tip alt + T Tip over a container.
turn alt + t Turn undead.[2]
version alt + v List compile time options for this version of NetHack.
versionshort v Show version string.


() These keybindings are only present when the number_pad option is enabled.

(††) These keybindings are only present when the number_pad option is disabled.

(†††) Not supported on all platforms

Wizard-mode commands

Playing in wizard mode adds several commands:

Command Shortcut Short Description
levelchange Change your experience level.
lightsources Show mobile light sources.
monpolycontrol Control monster polymorphs.
panic Test the panic routine.
polyself Polymorph self.
seenv Show seen vectors.
stats Show memory statistics.
timeout Look at the timeout queue.
vanquished List vanguished monsters.
vision Show vision array.
wizdebug_bury Bury objects under and around you.
wizdebug_traveldisplay Toggle travel display.
wizdetect ctrl + e Search a room.
wizgenesis ctrl + g Create a monster.
wizidentify ctrl + i Identify all items in inventory.
wizintrinsic Set intrinsic.
wizlevelport ctrl + v Teleport to another level.
wizmap ctrl + f Map the level.
wizrumorcheck Verify rumor boundaries.
wizsmell Smell monster.
wizwhere Show locations of special levels.
wizwish ctrl + w Wish for something.
wmode Show wall modes.

SLASH'EM

SLASH'EM adds the following extended commands:

Command Short Description
2weapon Alias of 'Twoweapon'.
Borrow steals gold from monsters.
Technique use a technique.
Youpoly Polymorph at will, as a Doppelganger, Flame mage, or Ice mage.

Notes

  1. This command currently does not function properly; see this commit.
  2. This command is related to the D&D concept of "undead turning"; it does not cause your character to suddenly become an undead monster!

This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.6.1. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-361}} tag to the current version's tag or {{noversion}} as appropriate.