keypad(3XC)
NAME
keypad − enable/disable keypad handling
SYNOPSIS
#include <curses.h>
int keypad(WINDOW ∗win, bool bf);
ARGUMENTS
winIs a pointer to the window in which to enable keypad handling.
bfIs a Boolean expression.
DESCRIPTION
If bf is TRUE, getch(3XC) handles special keys from the keyboard on the terminal associated with win as single values instead of character sequences. For example, if the user presses the right arrow key, getch() returns a single value, KEY_RIGHT, that represents the function key; otherwise, X/Open Curses handles the special keys as normal text.
See getch() for a list of tokens for function keys that are returned by getch().
RETURN VALUES
On success, the keypad() function returns OK. Otherwise, it returns ERR.
ERRORS
None.
SEE ALSO
SunOS 5.6 — Last change: 1 Jun 1996