Numeric prefix

Many commands in NetHack can be preceded by a numeric prefix, which modifies the action taken. This usually involves repeating the command several times, or interacting with a specified number of items.

If you are playing with vi keys (i.e. with number_pad off), you can enter numeric prefixes directly before the command, e.g.  to search for 10 moves.

If you are playing with number_pad on, you will need to use [n] to begin a numeric prefix, e.g.  to throw 100 zorkmids.

You can also use numbers to specify a certain number of items in some menus, such as when using the extended drop command or when applying a container. When the menu is visible, you can type a number followed by the menu letter (e.g. ) to manipulate only some of the items in the stack. You do not need to use n, even when number_pad is enabled.