get_wch(3curses)


get_wch -- get a wide character from a terminal

Synopsis

cc [options] file -lcurses
#include <curses.h>

int get_wch(wint_t *ch);

int mvget_wch(int y, int x, wint_t *ch);

int mvwget_wch(WINDOW *win, int y, int x, wint_t *ch);

int wget_wch(WINDOW *win, wint_t *ch);

Description

These functions read a character from the terminal associated with the current or specified window. If keypad(3curses) is enabled, these functions respond to the pressing of a function key by setting the object pointed to by ch to the corresponding KEY_ value defined in <curses.h> and returning KEY_CODE_YES.

Processing of terminal input is subject to the general rules described in ``Input Processing''.

If the current or specified window is not a pad, and it has been moved or modified since the last refresh operation, then it will be refreshed before another character is read.

Return value

When these functions successfully report the pressing of a function key, they return KEY_CODE_YES. When they successfully report a wide character, they return OK. Otherwise, they return ERR.

Errors

No errors are defined.

Usage

Applications should not define the escape key by itself as a single-character function.

When using these functions, nocbreak(3curses) mode and echo(3curses) mode should not be used at the same time. Depending on the state of the terminal when each character is typed, the application may produce undesirable results.

Standards Conformance

The Single UNIX Specification, Version 2; The Open Group.

References

``Input Processing'', beep(3curses), cbreak(3curses), ins_wch(3curses), keypad(3curses), move(3curses), curses(4), wchar(5)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004