Difference between revisions of "Repeat previous command"
Jump to navigation
Jump to search
m (link to numeric prefix) |
Scorchgeek (talk | contribs) (add info on wresting wands; remove engraving info specifically about Elbereth since using multiple Elbereths in a row is no longer useful) |
||
Line 5: | Line 5: | ||
Press {{kbd|ctrl|a}} to '''repeat previous command'''. | Press {{kbd|ctrl|a}} to '''repeat previous command'''. | ||
− | |||
− | == | + | == Common uses == |
+ | * Wands can be quickly [[Wrest|wrested]] by zapping them once and then holding down {{kbd|ctrl|a}} until something interesting happens. (As always when holding down keys in NetHack, this should be done only in a safe location.) | ||
* Repeatedly #[[untrap]]ping a box to make sure it is safe to open becomes much less annoying with this command: you can do the #untrap {{kbd|>}} sequence once, then just press {{kbd|ctrl|a}}, {{kbd|y}} repeatedly. | * Repeatedly #[[untrap]]ping a box to make sure it is safe to open becomes much less annoying with this command: you can do the #untrap {{kbd|>}} sequence once, then just press {{kbd|ctrl|a}}, {{kbd|y}} repeatedly. | ||
− | * When #[[dip]]ping potions into a fountain or pool to [[blank]] them, it is usually necessary to dip them twice. {{kbd|ctrl|a}} can be used to dip them the second time. | + | * When #[[dip]]ping potions into a fountain or pool to [[blank]] them, it is usually necessary to dip them twice. {{kbd|ctrl|a}}, {{kbd|y}} 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. | * 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. | ||
Line 16: | Line 16: | ||
The repeat command interacts rather strangely with spellcasting: pressing {{kbd|ctrl|a}} after casting a directional spell will bring up the casting menu to select a spell again (as if you just pressed {{kbd|Z}}), but when you select a spell, it will be cast in the same direction as your previous cast. | The repeat command interacts rather strangely with spellcasting: pressing {{kbd|ctrl|a}} after casting a directional spell will bring up the casting menu to select a spell again (as if you just pressed {{kbd|Z}}), but when you select a spell, it will be cast in the same direction as your previous cast. | ||
− | + | If you try to repeat an {{kbd|E}} {{kbd|-}} command, nothing will happen the first time you press {{kbd|ctrl|a}}, and the second time you press it you will be told, "You don't have that object." This is probably a bug. | |
+ | The repeat command is only available if NetHack was compiled with the REDO compile-time option (but this should be the case on nearly all installations). | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | {{nethack- | + | {{nethack-366}} |
Revision as of 01:07, 9 November 2021
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.
Common uses
- Wands can be quickly wrested by zapping them once and then holding down ctrl + a until something interesting happens. (As always when holding down keys in NetHack, this should be done only in a safe location.)
- 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, y 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.
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.
The repeat command is only available if NetHack was compiled with the REDO compile-time option (but this should be the case on nearly all installations).