Repeat previous command

From NetHackWiki
Revision as of 11:13, 19 June 2019 by Paxed (talk | contribs) (link to numeric prefix)
Jump to navigation Jump to search
Keyboard commands
~ ! @ # $ % ^ & * ( ) _ = +
Q W E R T Y U I O P { } |
q w e r t y u i o p [ ] \
A S D F G H J K L : "
a s d f g h j k l ; '
Z X C V B N M < > ?
z x c v b n m , . /
q w e r t u i o p Alt
a s d f j l Alt
c v n m ? Alt
A C R T O Alt
a c d o p r t [ Ctrl


For repeating a command multiple times, see numeric prefix.

Press ctrl + a to repeat previous command.

This is only available if NetHack was compiled with REDO compile-time option, but this should be the case on nearly all installations.

Particularly helpful uses

  • Repeatedly #untrapping a box to make sure it is safe to open becomes much less annoying with this command: you can do the #untrap > sequence once, then just press ctrl + a, y repeatedly.
  • When #dipping potions into a fountain or pool to blank them, it is usually necessary to dip them twice. ctrl + a can be used to dip them the second time.
  • Ranged weapons can be fired in the same direction for several turns in a row with the repeat command; this saves one to two keystrokes.


Limitations

The repeat command interacts rather strangely with spellcasting: pressing ctrl + a after casting a directional spell will bring up the casting menu to select a spell again (as if you just pressed Z), but when you select a spell, it will be cast in the same direction as your previous cast.

It is not possible to repeatedly engrave Elbereth using this command: pressing ctrl + a after an engrave command will select the same item you previously engraved with, but will not reenter the same engraving text or skip asking if you want to overwrite the previous engraving. Also, if you try to repeat an E - command, nothing will happen the first time you press ctrl + a, and the second time you press it you will be told, "You don't have that object." This is probably a bug.

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

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

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