.\"***************************************************************************
-.\" Copyright (c) 2002-2006,2010 Free Software Foundation, Inc. *
+.\" Copyright (c) 2002-2017,2018 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 *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_get_wch.3x,v 1.7 2010/08/14 23:31:42 tom Exp $
+.\" $Id: curs_get_wch.3x,v 1.11 2018/07/28 22:20:54 tom Exp $
.TH curs_get_wch 3X ""
+.na
+.hy 0
+.de bP
+.ie n .IP \(bu 4
+.el .IP \(bu 2
+..
.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 <curses.h>\fR
.sp
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<curses.h>\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
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<curses.h>\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
.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,