Difference between revisions of "Commands"

From NetHackWiki
Jump to navigation Jump to search
m
m (pothole)
 
(12 intermediate revisions by 5 users not shown)
Line 10: Line 10:
 
When entering commands with the {{kbd|#}} prefix, some commands will autocomplete after only a few letters. This behavior can be modified with the [[Options#AUTOCOMPLETE|AUTOCOMPLETE]] option.
 
When entering commands with the {{kbd|#}} prefix, some commands will autocomplete after only a few letters. This behavior can be modified with the [[Options#AUTOCOMPLETE|AUTOCOMPLETE]] option.
  
==Commands==
+
==Directional keys==
 
+
{|class="wikitable" style="text-align: center;"
Here is a list of commands, their default keybinding, and a short description.
+
|+ Keyboard
 
+
| {{kbd|y}} || || {{kbd|k}} || || {{kbd|u}}
{|class="prettytable striped"
+
|-
!Command
+
| || ↖ || ↑ || ↗ ||
!Shortcuts
 
!Short Description
 
 
|-
 
|-
|[[adjust]]
+
|{{kbd|h}} || ← || || → ||{{kbd|l}}
|{{kbd|alt|a}}
 
|Adjust [[inventory]] letters.
 
 
|-
 
|-
|[[annotate]]
+
| || ↙ ||  ↓ || ↘ ||
|{{kbd|alt|A}}
 
|Leave a note about the level.
 
 
|-
 
|-
|[[apply]]
+
| {{kbd|b}} || || {{kbd|j}} || || {{kbd|n}}
|{{kbd|a}}
+
|}
|Apply (use) a tool.
+
 
 +
{|class="wikitable" style="text-align: center;"
 +
|+ Numpad<sup>†</sup>
 +
| {{kbd|Numpad 7}} || || {{kbd|Numpad 8}} || || {{kbd|Numpad 9}}
 
|-
 
|-
|[[attributes]]
+
| || ↖ || ↑ || ↗ ||
|{{kbd|ctrl|x}}
 
|Show your attributes.
 
 
|-
 
|-
|[[autopickup]]
+
|{{kbd|Numpad 4}} || ← || || → ||{{kbd|Numpad 6}}
|{{kbd|@}}
 
|Toggle autopickup on/off.
 
 
|-
 
|-
|[[call]]
+
| || ↙ ||  ↓ || ↘ ||
|{{kbd|C}}
 
|Name a monster or object, or add an [[annotate|annotation]].
 
 
|-
 
|-
|[[Spellcasting|cast]]
+
| {{kbd|Numpad 1}} || || {{kbd|Numpad 2}} || || {{kbd|Numpad 3}}
|{{kbd|Z}}
+
|}
|Cast a spell.
+
(<sup>†</sup>)Available ony if [[number_pad]] option is '''enabled'''.
 +
 
 +
==Commands==
 +
Here is a list of commands, their default keybinding, and a short description.
 +
 
 +
==={{kbd|Meta}} Key===
 +
{|class="prettytable"
 +
!System
 +
!Key
 
|-
 
|-
|[[chat]]
+
|NT, OS/2, PC and ST || {{kbd|Alt}}
|{{kbd|alt|c}}
 
|Talk to someone.
 
 
|-
 
|-
|[[close]]
+
|Amiga || Set [[altmeta]] option
|{{kbd|c}}
+
|}
|Close a door.
+
 
 +
===Controls===
 +
{|class="prettytable"
 +
!Category
 +
!Action
 +
!Extended Command
 +
!Key
 +
!Short Description
 
|-
 
|-
|[[conduct]]
+
| rowspan="3"| || Cancel || || {{kbd|ESC}} ||
|{{kbd|alt|C}}
 
|List which challenges you have adhered to.
 
 
|-
 
|-
|[[dip]]
+
| Redo last command || || {{kbd|Ctrl|a}} ||
|{{kbd|alt|d}}
 
|Dip an [[object]] into something.
 
 
|-
 
|-
|[[Staircase|down]]
+
| Panic button || || {{kbd|Ctrl|c}} || Quit the game.
|{{kbd|&gt;}}
 
|Go down a staircase.
 
 
|-
 
|-
|[[drop]]
+
| rowspan="3" | Shell Commands
|{{kbd|d}}
+
|[[Save]]
|Drop an item.
+
|#save
 +
|{{kbd|S}}
 +
|Save the game and exit.
 
|-
 
|-
|[[drop|droptype]]
+
|[[Quit]]
|{{kbd|D}}
+
|#quit
|Drop specific item types.
+
|{{kbd|Meta|q}}
 +
|Exit without saving current game.
 
|-
 
|-
|[[eat]]
+
|[[^Z|Suspend]]
|{{kbd|e}}
+
|#suspend
|Eat something.
+
|{{kbd|Ctrl|z}}
 +
|Suspend the game (UNIX(R) versions with job control only).
 
|-
 
|-
|[[engrave]]
+
|Message|| [[Repeat previous messages]] || #prevmsg ||{{kbd|Ctrl|p}} || Show previously displayed game messages.
|{{kbd|E}}
 
|Engrave writing on the floor.
 
 
|-
 
|-
|[[enhance]]
+
| rowspan="2" | Help on commands
|{{kbd|alt|e}}
+
|
|Advance or check weapons [[skill]]s.
+
|#whatdoes
 +
|{{kbd|&amp;}}
 +
|Tell what a key does.
 
|-
 
|-
|[[exploremode]]
 
 
|
 
|
|Change your game mode to explore mode.
+
|#?
 +
|{{kbd|Meta|?}}<sup>†††</sup>
 +
|Get the list of available extended commands.
 +
|-
 +
| rowspan="6" | Help, in game
 +
| rowspan="2" |[[Help (in-game)]]
 +
| rowspan="2" |#help
 +
|{{kbd|?}}
 +
| rowspan="2" |Show the help menu.
 
|-
 
|-
|[[firing|fire]]
+
|{{kbd|h}}<sup>†</sup>
|{{kbd|f}}
 
|Fire ammunition from quiver.
 
 
|-
 
|-
|[[force]]
+
|[[What is]]
|{{kbd|alt|f}}
+
|#whatis
|Force a lock.
+
|{{kbd|/}}
 +
|Show what type of a thing a symbol corresponds to.
 
|-
 
|-
|[[Far look|glance]]
+
|[[Far look]]
 +
|#glance
 
|{{kbd|;}}
 
|{{kbd|;}}
 
|Show what a map symbol means.
 
|Show what a map symbol means.
 
|-
 
|-
|[[Help (in-game)|help]]
+
|
|{{kbd|?}}, {{kbd|h}}<sup>†</sup>
+
|#herecmdmenu
|Show the help menu.
+
|
 +
|Show a menu of possible actions in your current location.
 
|-
 
|-
|herecmdmenu
 
 
|
 
|
|Show a menu of possible actions in your current location.
+
|#therecmdmenu
 +
|
 +
|Show menu of possible actions in an adjacent location.<ref>This command currently does not function properly; see [https://github.com/NetHack/NetHack/commit/00c4e832c5a35e6e9a5eca1ed109abe8cbad311c this commit].</ref>
 
|-
 
|-
|[[history]]
+
| rowspan="3" | In game options
|{{kbd|V}}
+
|[[Explore mode]]
|Show long version and game history.
+
|#exploremode
 +
|
 +
|Enter non-scoring game exploring/discovery mode. Used for learning about the game.
 
|-
 
|-
|[[inventory]]
+
|[[Autopickup]]
|{{kbd|i}}
+
|#autopickup
|Show your inventory.
+
|{{kbd|@}}
 +
|Toggle autopickup on/off.
 
|-
 
|-
|[[Inventory|inventtype]]
+
|[[Terrain]]
|{{kbd|I}}
+
|#terrain
|Inventory specific item types.
+
|
 +
|Show the map without monsters, objects, or traps.
 
|-
 
|-
|[[invoke]]
+
| rowspan="14" | Motion
|{{kbd|alt|i}}
+
|
|Invoke an object's powers.
+
|
 +
|{{kbd|Direction keys}}
 +
|Go one step in the direction indicated
 
|-
 
|-
|[[jump]]
+
|
|{{kbd|alt|j}}, {{kbd|j}}<sup>†</sup>
+
|
|Jump to a location.
+
|Uppercase {{kbd|Direction keys}}
 +
|Go in that direction until you hit a wall
 
|-
 
|-
|[[kick]]
+
|
|{{kbd|ctrl|d}}, {{kbd|k}}<sup>†</sup>
+
|
|Kick something.
+
|{{kbd|m|Direction keys}}
 +
|Move without picking up objects or fighting
 
|-
 
|-
|[[Discoveries|known]]
+
|
|{{kbd|\}}
+
|
|Show discovered objects.
+
|{{kbd|M|Direction keys}}
 +
|Move far, no pickup
 
|-
 
|-
|[[Discoveries|knownclass]]
+
|
|{{kbd|`}}
+
|
|Show discovered objects of one type.
+
|{{kbd|g|Direction keys}}
 +
|Move until something interesting is found.
 
|-
 
|-
|[[Near look|look]]
+
| rowspan="2" |
|{{kbd|:}}
+
| rowspan="2" |
|Look at what is under you.
+
|{{kbd|G|Direction keys}}
 +
| rowspan="2" |Same as {{kbd|g|Direction keys}}, but forking of corridors is not considered interesting.
 
|-
 
|-
|[[loot]]
+
|{{kbd|Ctrl|Direction keys}}
|{{kbd|alt|l}}, {{kbd|l}}<sup>†</sup>
 
|Loot a [[container|box]] on the floor.
 
 
|-
 
|-
|[[monster (command)|monster]]
+
| rowspan="2" |[[Staircase]]
|{{kbd|alt|m}}
+
|#up
|Use a monster's special ability.
+
|{{kbd|&lt;}}
 +
|Go up a staircase.
 
|-
 
|-
|[[name]]
+
|#down
|{{kbd|alt|n}}, {{kbd|C}}, {{kbd|n}}<sup>†</sup>
+
|{{kbd|&gt;}}
|Name an [[item]] or type of object.
+
|Go down a staircase.
 
|-
 
|-
|[[offer]]
+
| rowspan="2" |[[Travel]]
|{{kbd|alt|o}}
+
| rowspan="2" |#travel
|Offer a sacrifice to the [[gods]].
+
|{{kbd|_}}
 +
|Travel to a specific location on the map.
 
|-
 
|-
|[[open]]
+
|{{kbd|m|_}}
|{{kbd|o}}
+
|{{kbd|m}} prefix shows a menu of interesting targets in sight without asking to move the cursor.
|Open a door.
 
 
|-
 
|-
|[[options]]
+
|[[Teleport]]
|{{kbd|O}}
+
|#teleport
|Show and change settings.
+
|{{kbd|Ctrl|t}}
 +
|Teleport around the level, if you have the ability.
 
|-
 
|-
|[[overview]]
+
| rowspan="2" |[[Jump]]
|{{kbd|alt|O}}, {{kbd|ctrl|o}}
+
| rowspan="2" |#jump
|Display an overview of the dungeon.
+
|{{kbd|Meta|j}}
 +
| rowspan="2" |Jump to a location.
 
|-
 
|-
|[[Shop|pay]]
+
|{{kbd|j}}<sup>†</sup>
|{{kbd|p}}
 
|Pay your shopping bill.
 
 
|-
 
|-
|[[Pick up|pickup]]
+
| rowspan="4" |Other actions
|{{kbd|,}}
+
|[[Wipe]]
|Pick up things at current location.
+
|#wipe
 +
|{{kbd|Meta|w}}
 +
|Wipe off your face.
 
|-
 
|-
|[[pray]]
+
|[[Sit]]
|{{kbd|alt|p}}
+
|#sit
|Pray to the gods for help.
+
|{{kbd|Meta|s}}
 +
|Sit down.
 
|-
 
|-
|[[Repeat previous messages|prevmsg]]
+
| rowspan="2"|[[Rest]]
|{{kbd|ctrl|p}}
+
| rowspan="2"|#wait
|Show previously displayed game messages.
+
|{{kbd|.}}
 +
| rowspan="2"|Rest one move while doing nothing.
 
|-
 
|-
|[[Put on|puton]]
+
|{{kbd|Space}} if [[rest_on_space]] is on.
|{{kbd|P}}
 
|Put on an accessory.
 
 
|-
 
|-
|[[quaff]]
+
|rowspan="6"|Battle
|{{kbd|q}}
+
|Fight
|Drink something.
+
|
 +
|{{kbd|F|Direction keys}}
 +
|Fight a monster (even if you only guess one is there).
 
|-
 
|-
|[[quit]]
+
|[[Firing]]
|{{kbd|alt|q}}
+
|#fire
|Exit without saving current game.
+
|{{kbd|f}}
 +
|Fire ammunition from quiver.
 
|-
 
|-
|[[quiver]]
+
|[[Quiver]]
 +
|#quiver
 
|{{kbd|Q}}
 
|{{kbd|Q}}
 
|Select ammunition for quiver.
 
|Select ammunition for quiver.
 
|-
 
|-
|[[read]]
+
|[[Zap]]
|{{kbd|r}}
+
|#zap
|Read a scroll, spellbook, or something else.
+
|{{kbd|z}}
 +
|Zap a wand.
 +
|-
 +
|[[Spellcasting]]
 +
|#cast
 +
|{{kbd|Z}}
 +
|Cast a spell.
 +
|-
 +
|[[Throw]]
 +
|#throw
 +
|{{kbd|t}}
 +
|Throw something.
 +
|-
 +
|rowspan="3"|Explore
 +
|[[Near look]]
 +
|#look
 +
|{{kbd|:}}
 +
|Look at what is under you.
 +
|-
 +
|[[Search]]
 +
|#search
 +
|{{kbd|s}}
 +
|Search for unseen things near you.
 
|-
 
|-
|redraw
+
|[[Engrave]]
|{{kbd|ctrl|r}}, {{kbd|ctrl|l}}<sup>†</sup>
+
|#engrave
|Redraw the screen.
+
|{{kbd|E}}
 +
|Engrave writing on the floor.
 
|-
 
|-
|[[remove]]
+
|rowspan="3"|[[Trap]]
|{{kbd|R}}
+
|
|Remove an accessory.
+
|#seetrap
 +
|{{kbd|^}}
 +
|Show the type of an adjacent trap.
 
|-
 
|-
|[[ride]]
+
|rowspan="2"|[[untrap]]
|{{kbd|alt|R}}
+
|rowspan="2"|#untrap
|Ride (or stop riding) a [[monster]].
+
|{{kbd|Meta|u}}
 +
|rowspan="2"|Untrap something.
 
|-
 
|-
|[[rub]]
+
|{{kbd|u}}<sup>†</sup>
|{{kbd|alt|r}}
+
|}
|Rub a [[lamp]] or a [[stone]].
+
 
 +
===In Game Status===
 +
{|class="prettytable"
 +
!Category
 +
!Action
 +
!Extended Command
 +
!Key
 +
!Short Description
 
|-
 
|-
|[[save]]
+
|
|{{kbd|S}}
+
|[[Attributes|Character info]]
|Save the game and exit.
+
|#attributes
 +
|{{kbd|Ctrl|x}}
 +
|Display basic information about your character.
 
|-
 
|-
|[[search]]
+
|
|{{kbd|s}}
+
|[[Conduct]]
|Search for unseen things near you.
+
|#conduct
 +
|{{kbd|Meta|C}}
 +
|List which challenges you have adhered to.
 
|-
 
|-
|seeall
+
|rowspan="8"|Current equipment
 +
|
 +
|#seeall
 
|{{kbd|*}}
 
|{{kbd|*}}
 
|Show all equipment in use.
 
|Show all equipment in use.
 
|-
 
|-
|[[Amulet|seeamulet]]
+
|[[Amulet]]
 +
|#seeamulet
 
|{{kbd|"}}
 
|{{kbd|"}}
 
|Show currently worn amulet.
 
|Show currently worn amulet.
 
|-
 
|-
|[[Armor|seearmor]]
+
|[[Armor]]
 +
|#seearmor
 
|{{kbd|[}}
 
|{{kbd|[}}
 
|Show currently worn armor.
 
|Show currently worn armor.
 
|-
 
|-
|[[Gold|seegold]]
+
|[[Gold]]
 +
|#seegold
 
|{{kbd|$}}
 
|{{kbd|$}}
 
|Count your gold.
 
|Count your gold.
 
|-
 
|-
|[[Ring|seerings]]
+
|[[Ring]]
 +
|#seerings
 
|{{kbd|{{=}}}}
 
|{{kbd|{{=}}}}
 
|Show currently worn ring(s).
 
|Show currently worn ring(s).
 
|-
 
|-
|[[Spellcasting|seespells]]
+
|[[Spellcasting]]
 +
|#seespells
 
|{{kbd|+}}
 
|{{kbd|+}}
 
|List and reorder known spells.
 
|List and reorder known spells.
 
|-
 
|-
|[[Tool|seetools]]
+
|[[Tool]]
 +
|#seetools
 
|{{kbd|(}}
 
|{{kbd|(}}
 
|Show tools currently in use.
 
|Show tools currently in use.
 
|-
 
|-
|[[Trap|seetrap]]
+
|[[Weapon]]
|{{kbd|^}}
+
|#seeweapon
|Show the type of an adjacent trap.
 
|-
 
|[[Weapon|seeweapon]]
 
 
|{{kbd|)}}
 
|{{kbd|)}}
 
|Show currently wielded weapons.
 
|Show currently wielded weapons.
 
|-
 
|-
|[[Shell escape|shell]]
+
|rowspan="2"|[[Discoveries]]
|{{kbd|!}}
+
|
|Do a shell escape. (Disabled on most NetHack servers.)
+
|#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>
 +
|}
 +
 
 +
===Equipment, Skills & Inventory===
 +
{|class="prettytable"
 +
!Category
 +
!Action
 +
!Extended Command
 +
!Key
 +
!Short Description
 +
|-
 +
|rowspan="11"|Equipment
 +
|rowspan="2"|[[Twoweapon]]
 +
|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.
 
|-
 
|-
|[[sit]]
+
|[[Wield]]
|{{kbd|alt|s}}
+
|#wield
|Sit down.
+
|{{kbd|w}}
 +
|Wield a weapon.
 
|-
 
|-
|[[^Z|suspend]]
+
|[[Wear]]
|{{kbd|ctrl|z}}
+
|#wear
|Suspend the game.
+
|{{kbd|W}}
 +
|Wear a piece of armor.
 
|-
 
|-
|[[Swap weapons|swap]]
+
|[[Swap weapons]]
 +
|#swap
 
|{{kbd|x}}
 
|{{kbd|x}}
 
|Swap wielded and secondary weapons.
 
|Swap wielded and secondary weapons.
 
|-
 
|-
|[[Take off|takeoff]]
+
|rowspan="2"|[[Apply]]
|{{kbd|T}}
+
|rowspan="2"|#apply
|Take off one piece of armor.
+
|{{kbd|a}}
 +
|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
 +
|-
 +
|
 +
|[[Quiver]]
 +
|#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
 +
|{{kbd|C}}
 +
|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.
 +
|}
 +
 
 +
===Character interaction===
 +
{|class="prettytable"
 +
!Category
 +
!Action
 +
!Extended Command
 +
!Key
 +
!Short Description
 +
|-
 +
|
 +
|[[Chat]]
 +
|#chat
 +
|{{kbd|Meta|c}}
 +
|Talk to someone, monster or creature.
 +
|-
 +
|[[Shop]]
 +
|Pay bill
 +
|#pay
 +
|{{kbd|p}}
 +
|Pay your shopping bill.
 +
|-
 +
|rowspan="6"|Creature
 +
|[[Ride]]
 +
|#ride
 +
|{{kbd|Meta|R}}
 +
|Ride (or stop riding) a [[monster]].
 +
|-
 +
|[[Call]]
 +
|#call
 +
|{{kbd|C}}
 +
|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>
 +
|-
 +
|[[monster (command)|Monster Ability]]
 +
|#monster
 +
|{{kbd|Meta|m}}
 +
|Use a monster's special ability.
 +
|-
 +
|[[Turn undead|Turn undead away]]
 +
|#turn
 +
|{{kbd|Meta|t}}
 +
|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>
 +
|-
 +
|rowspan="2"|Gods
 +
|[[Pray]]
 +
|#pray
 +
|{{kbd|Meta|p}}
 +
|Pray to the gods for help.
 +
|-
 +
|[[Offer]]
 +
|#offer
 +
|{{kbd|Meta|o}}
 +
|Offer a sacrifice to the [[god]]s.
 +
|}
 +
 
 +
===Item interaction===
 +
{|class="prettytable"
 +
!Category
 +
!Action
 +
!Extended Command
 +
!Key
 +
!Short Description
 +
|-
 +
|rowspan="23"|Basics
 +
|rowspan="2"|[[Pick up]]
 +
|rowspan="2"|#pickup
 +
|{{kbd|,}}
 +
|Pick up things at current location.
 +
|-
 +
|{{kbd|m|,}}
 +
|{{kbd|m}} prefix to force a selection menu
 +
|-
 +
|rowspan="11"|[[Drop]]
 +
|#drop
 +
|{{kbd|d}}
 +
|Drop an item.
 +
|-
 +
|#droptype
 +
|{{kbd|D}}
 +
|Drop specific item types.
 +
|-
 +
|
 +
|{{kbd|D|B}}
 +
|Drop all objects known to be blessed.
 +
|-
 +
|
 +
|{{kbd|D|U}}
 +
|Drop all objects known to be uncursed.
 +
|-
 +
|
 +
|{{kbd|D|C}}
 +
|Drop all objects known to be cursed.
 +
|-
 +
|
 +
|{{kbd|D|X}}
 +
|Drop all objects of unknown B/U/C status.
 +
|-
 +
|
 +
|{{kbd|D|a}}
 +
|Drop all objects, without asking for confirmation.
 
|-
 
|-
|[[Take off|takeoffall]]
+
|
|{{kbd|A}}
+
|{{kbd|D|i}}
|Remove all armor.
+
|Examine your inventory before dropping anything.
 
|-
 
|-
|[[teleport]]
+
|
|{{kbd|ctrl|t}}
+
|{{kbd|D|u}}
|Teleport around the level.
+
|Drop only unpaid objects (when in a shop).
 
|-
 
|-
|[[terrain]]
 
 
|
 
|
|Show the map without monsters, objects, or traps.
+
|{{kbd|D|m}}
 +
|Use a menu to pick which object(s) to drop.
 
|-
 
|-
|therecmdmenu
 
 
|
 
|
|Show menu of possible actions in an adjacent location.
+
|{{kbd|D|%|u}}
 +
|Drop only unpaid food.
 +
|-
 +
|rowspan="2"|[[Kick]]
 +
|rowspan="2"|#kick
 +
|{{kbd|Ctrl|d}}
 +
|rowspan="2"|Kick something.
 +
|-
 +
|{{kbd|k}}<sup>†</sup>
 +
|-
 +
|[[Read]]
 +
|#read
 +
|{{kbd|r}}
 +
|Read a scroll, spellbook, or something else.
 +
|-
 +
|rowspan="2"|[[Eat]]
 +
|rowspan="2"|#eat
 +
|{{kbd|e}}
 +
|Eat something.
 +
|-
 +
|{{kbd|m|e}}
 +
|{{kbd|m|}} prefix skips eating items on the floor.
 +
|-
 +
|[[quaff|Drink]]
 +
|#quaff
 +
|{{kbd|q}}
 +
|Drink something.
 +
|-
 +
|[[Rub]]
 +
|#rub
 +
|{{kbd|Meta|r}}
 +
|Rub a [[lamp]] or a [[stone]].
 +
|-
 +
|[[Dip]]
 +
|#dip
 +
|{{kbd|Meta|d}}
 +
|Dip an [[object]] into something.
 +
|-
 +
|[[Invoke]]
 +
|#invoke
 +
|{{kbd|Meta|i}}
 +
|Invoke an object's powers.
 
|-
 
|-
|[[throw]]
+
|[[Throw]]
 +
|#throw
 
|{{kbd|t}}
 
|{{kbd|t}}
 
|Throw something.
 
|Throw something.
 
|-
 
|-
|[[tip]]
+
|rowspan="3"|[[container|Containers,bag,box]]
|{{kbd|alt|T}}
+
|[[Tip]]
 +
|#tip
 +
|{{kbd|Meta|T}}
 
|Tip over a container.
 
|Tip over a container.
 
|-
 
|-
|[[travel]]
+
|rowspan="2"|[[Loot]]
|{{kbd|_}}
+
|rowspan="2"|#loot
|Travel to a specific location on the map.
+
|{{kbd|Meta|l}}
 +
|rowspan="2"|Loot a box on the floor.
 
|-
 
|-
|[[Turn undead|turn]]
+
|{{kbd|l}}<sup></sup>
|{{kbd|alt|t}}
 
|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]]
+
|rowspan="2"|Doors
|{{kbd|X}}, {{kbd|alt|2}}<sup>††</sup>
+
|[[open|Open door]]
|Toggle two-weapon combat.
+
|#open
 +
|{{kbd|o}}
 +
|Open a door.
 
|-
 
|-
|[[untrap]]
+
|[[close|Close door]]
|{{kbd|alt|u}}, {{kbd|u}}<sup>†</sup>
+
|#close
|Untrap something.
+
|{{kbd|c}}
 +
|Close a door.
 
|-
 
|-
|[[Staircase|up]]
+
|Lock
|{{kbd|&lt;}}
+
|[[Force lock]]
|Go up a staircase.
+
|#force
 +
|{{kbd|Meta|f}}
 +
|Force a lock.
 +
|}
 +
 
 +
===System===
 +
{|class="prettytable"
 +
!Action
 +
!Extended Command
 +
!Key
 +
!Short Description
 
|-
 
|-
|[[version]]
+
|[[History]]
|{{kbd|alt|v}}
+
|#history
|List compile time options for this version of NetHack.
+
|{{kbd|V}}
 +
|Show long version and game history.
 
|-
 
|-
|[[Version|versionshort]]
+
|rowspan="2"|[[Version]]
 +
|#versionshort
 
|{{kbd|v}}
 
|{{kbd|v}}
 
|Show version string.
 
|Show version string.
 
|-
 
|-
|[[Rest|wait]]
+
|#version
|{{kbd|.}}
+
|{{kbd|Meta|v}}
|Rest one move while doing nothing.
+
|List compile time options for this version of NetHack.
|-
 
|[[wear]]
 
|{{kbd|W}}
 
|Wear a piece of armor.
 
 
|-
 
|-
|whatdoes
+
|rowspan="2"|Redraw screen
|{{kbd|&amp;}}
+
|rowspan="2"|#redraw
|Tell what a key does.
+
|{{kbd|Ctrl|r}}
 +
|rowspan="2"|Redraw the screen.
 
|-
 
|-
|[[What is|whatis]]
+
|{{kbd|Ctrl|l}}<sup>†</sup>
|{{kbd|/}}
 
|Show what type of a thing a symbol corresponds to.
 
 
|-
 
|-
|[[wield]]
+
|[[Shell escape]]
|{{kbd|w}}
+
|#shell
|Wield a weapon.
+
|{{kbd|!}}
 +
|Do a shell escape. (Disabled on most NetHack servers.)
 
|-
 
|-
|[[wipe]]
+
|[[Options]]
|{{kbd|alt|w}}
+
|#options
|Wipe off your face.
+
|{{kbd|O}}
|-
+
|Show and change settings.
|[[zap]]
 
|{{kbd|z}}
 
|Zap a wand.
 
|-
 
|?
 
|{{kbd|alt|?}}
 
|Get this list of commands.
 
 
|}
 
|}
 
 
(<sup>†</sup>) These keybindings are only present when the [[number_pad]] option is '''enabled'''.
 
(<sup>†</sup>) These keybindings are only present when the [[number_pad]] option is '''enabled'''.
  
 
(<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
  
 
==Wizard-mode commands==
 
==Wizard-mode commands==
Line 499: Line 868:
 
|Polymorph at will, as a [[Doppelganger (starting race)|Doppelganger]], [[Flame mage]], or [[Ice mage]].
 
|Polymorph at will, as a [[Doppelganger (starting race)|Doppelganger]], [[Flame mage]], or [[Ice mage]].
 
|}
 
|}
 +
 +
==Reference cards==
 +
A number of downloadable [[reference card]]s are also available for quick reference.
  
 
== Notes ==
 
== Notes ==
 
<references/>
 
<references/>
 
 
{{nethack-361}}
 
{{nethack-361}}
 +
[[Category:Commands]]

Latest revision as of 17:15, 29 October 2023

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 Extended 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.
#herecmdmenu Show a menu of possible actions in your current location.
#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 Fight 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 Extended 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

Equipment, Skills & Inventory

Category Action Extended 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.

Character interaction

Category Action Extended Command Key Short Description
Chat #chat Meta + c Talk to someone, monster or creature.
Shop Pay bill #pay p Pay your shopping bill.
Creature Ride #ride Meta + R Ride (or stop riding) a monster.
Call #call C Name a monster or object, or add an annotation.
Name #name Meta + n Name an item or type of object.
N
Monster Ability #monster Meta + m Use a monster's special ability.
Turn undead away #turn Meta + t Turn undead.[2]
Gods Pray #pray Meta + p Pray to the gods for help.
Offer #offer Meta + o Offer a sacrifice to the gods.

Item interaction

Category Action Extended Command Key Short Description
Basics Pick up #pickup , Pick up things at current location.
m + , m prefix to force a selection menu
Drop #drop d Drop an item.
#droptype D Drop specific item types.
D + B Drop all objects known to be blessed.
D + U Drop all objects known to be uncursed.
D + C Drop all objects known to be cursed.
D + X Drop all objects of unknown B/U/C status.
D + a Drop all objects, without asking for confirmation.
D + i Examine your inventory before dropping anything.
D + u Drop only unpaid objects (when in a shop).
D + m Use a menu to pick which object(s) to drop.
D + % + u Drop only unpaid food.
Kick #kick Ctrl + d Kick something.
k
Read #read r Read a scroll, spellbook, or something else.
Eat #eat e Eat something.
m + e m prefix skips eating items on the floor.
Drink #quaff q Drink something.
Rub #rub Meta + r Rub a lamp or a stone.
Dip #dip Meta + d Dip an object into something.
Invoke #invoke Meta + i Invoke an object's powers.
Throw #throw t Throw something.
Containers,bag,box Tip #tip Meta + T Tip over a container.
Loot #loot Meta + l Loot a box on the floor.
l
Doors Open door #open o Open a door.
Close door #close c Close a door.
Lock Force lock #force Meta + f Force a lock.

System

Action Extended Command Key Short Description
History #history V Show long version and game history.
Version #versionshort v Show version string.
#version Meta + v List compile time options for this version of NetHack.
Redraw screen #redraw Ctrl + r Redraw the screen.
Ctrl + l
Shell escape #shell ! Do a shell escape. (Disabled on most NetHack servers.)
Options #options O Show and change settings.

() 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.

Reference cards

A number of downloadable reference cards are also available for quick reference.

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.