X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=man%2Fcurs_get_wch.3x;h=fd55b374beb9b72d374ad307716004330f0f9a66;hp=6ecff799b5d60a96987e06b408a359d236b25098;hb=5c2245b6fc619f8d96ce940281dfbf13b5b8900b;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/man/curs_get_wch.3x b/man/curs_get_wch.3x index 6ecff799..fd55b374 100644 --- a/man/curs_get_wch.3x +++ b/man/curs_get_wch.3x @@ -1,5 +1,5 @@ .\"*************************************************************************** -.\" Copyright (c) 2002-2003,2006 Free Software Foundation, Inc. * +.\" Copyright (c) 2002-2012,2016 Free Software Foundation, Inc. * .\" * .\" Permission is hereby granted, free of charge, to any person obtaining a * .\" copy of this software and associated documentation files (the * @@ -26,14 +26,21 @@ .\" authorization. * .\"*************************************************************************** .\" -.\" $Id: curs_get_wch.3x,v 1.6 2006/02/25 21:47:06 tom Exp $ +.\" $Id: curs_get_wch.3x,v 1.9 2016/05/15 01:12:50 tom Exp $ .TH curs_get_wch 3X "" +.na +.hy 0 +.de bP +.IP \(bu 4 +.. .SH NAME \fBget_wch\fR, \fBwget_wch\fR, \fBmvget_wch\fR, \fBmvwget_wch\fR, \fBunget_wch\fR \- get (or push back) a wide character from curses terminal keyboard +.ad +.hy .SH SYNOPSIS \fB#include \fR .sp @@ -76,13 +83,8 @@ If \fBkeypad\fR is enabled, these functions respond to the pressing of a function key by setting the object pointed to by \fIwch\fR -to the corresponding -\fBKEY_\fR -value defined -in -\fB\fR -and returning -\fBKEY_CODE_YES\fR. +to the keycode assigned to the function key, +and returning \fBKEY_CODE_YES\fR. If a character (such as escape) that could be the beginning of a function key is received, curses sets a timer. If the remainder @@ -92,6 +94,18 @@ For this reason, many terminals experience a delay between the time a user presses the escape key and the time the escape is returned to the program. .PP +The keycodes returned by these functions are the same as those +returned by \fBwgetch\fP: +.bP +The predefined function +keys are listed in \fB\fR as macros with values outside the range +of 8-bit characters. +Their names begin with \fBKEY_\fR. +.bP +Other (user-defined) function keys which may be defined using \fBdefine_key\fP(3X) +have no names, but also are expected to have values outside the range of +8-bit characters. +.PP The \fBunget_wch\fR function pushes the wide character @@ -132,7 +146,7 @@ is typed, the program may produce undesirable results. .PP All functions except \fBwget_wch\fR and \fBunget_wch\fR may be macros. -.SH RETURN VALUES +.SH RETURN VALUE When \fBget_wch\fR, \fBwget_wch\fR, @@ -152,6 +166,10 @@ returns \fBOK\fR. Otherwise, the function returns \fBERR\fR. +.PP +Functions with a "mv" prefix first perform a cursor movement using +\fBwmove\fP, and return an error if the position is outside the window, +or if the window pointer is null. .SH SEE ALSO \fBcurses\fR(3X), \fBcurs_getch\fR(3X),