int getch()
int wgetch(win)
int mvgetch(y, x)
int mvwgetch(win, y, x)
getch() will read input from the
terminal in a manner depending on whether delay mode is set or
not. If delay is on, getch() will wait until a key is
pressed, otherwise it will return the key in the input buffer
or ERR if this buffer is empty. mvgetch(...) and
mvwgetch(...)
will move the cursor to position y,x
first. The w functions read input from the terminal
related to the window win, getch() and
mvgetch(...)
from the terminal related to .
With keypad(...) enabled, getch() will return a code defined in
.h as KEY_* macros when a function key is pressed. When
ESCAPE is pressed (which can be the beginning of a function key)
ncurses will start a one second timer. If the remainder of
the keystroke is not finished in this second, the key is returned.
Otherwise, the function key value is returned.
(If necessary, use notimeout() to disable the second
timer).