]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - man/curs_getch.3x
ncurses 6.4 - patch 20231007
[ncurses.git] / man / curs_getch.3x
index 75a06663a9fe74088f8f79120b0efc5853f54f0f..cf7225b6cf3436e156ef3771d557e43b507865e5 100644 (file)
 .\" authorization.                                                           *
 .\"***************************************************************************
 .\"
-.\" $Id: curs_getch.3x,v 1.67 2023/07/01 15:43:20 tom Exp $
-.TH curs_getch 3X 2023-07-01 "ncurses 6.4" "Library calls"
-.na
-.hy 0
-.ie \n(.g .ds `` \(lq
-.el       .ds `` ``
-.ie \n(.g .ds '' \(rq
-.el       .ds '' ''
+.\" $Id: curs_getch.3x,v 1.75 2023/10/07 21:19:07 tom Exp $
+.TH curs_getch 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.ie \n(.g \{\
+.ds `` \(lq
+.ds '' \(rq
+.\}
+.el \{\
+.ie t .ds `` ``
+.el   .ds `` ""
+.ie t .ds '' ''
+.el   .ds '' ""
+.\}
+.
 .de bP
 .ie n  .IP \(bu 4
 .el    .IP \(bu 2
 ..
 .SH NAME
-\fBgetch\fP,
-\fBwgetch\fP,
-\fBmvgetch\fP,
-\fBmvwgetch\fP,
-\fBungetch\fP,
-\fBhas_key\fP \- get (or push back) characters from \fBcurses\fP terminal keyboard
-.ad
-.hy
+\fB\%getch\fP,
+\fB\%wgetch\fP,
+\fB\%mvgetch\fP,
+\fB\%mvwgetch\fP,
+\fB\%ungetch\fP,
+\fB\%has_key\fP \-
+get (or push back) characters from \fIcurses\fR terminal keyboard
 .SH SYNOPSIS
+.nf
 .B #include <curses.h>
 .PP
 .B int getch(void);
-.br
-.B int wgetch(WINDOW *\fIwin\fB);
-.sp
-.B int mvgetch(int \fIy\fB, int \fIx\fB);
-.br
-.B int mvwgetch(WINDOW *\fIwin\fB, int \fIy\fB, int \fIx\fB);
-.sp
-.B int ungetch(int \fIch\fB);
-.sp
-/* extension */
-.br
-.B int has_key(int \fIch\fB);
-.br
+.B int wgetch(WINDOW *\fIwin\fP);
+.PP
+.B int mvgetch(int \fIy\fP, int \fIx\fP);
+.B int mvwgetch(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP);
+.PP
+.B int ungetch(int \fIch\fP);
+.PP
+\fI/* extension */\fP
+.B int has_key(int \fIch\fP);
+.fi
 .SH DESCRIPTION
 .SS Reading characters
 The \fBgetch\fP, \fBwgetch\fP, \fBmvgetch\fP and \fBmvwgetch\fP, routines read
@@ -151,8 +153,9 @@ misspellings (such as \*(``RSUME\*('' for \*(``resume\*('').
 The names correspond to the long terminfo capability names for the keys,
 and were defined long ago, in the 1980s.
 .PP
+.RS
 .TS
-center tab(/) ;
+tab(/) ;
 l l .
 \fBName\fP/\fBKey\fP \fBname\fP
 _
@@ -253,16 +256,19 @@ KEY_SUNDO/Shifted undo key
 KEY_SUSPEND/Suspend key
 KEY_UNDO/Undo key
 .TE
+.RE
 .PP
 Keypad is arranged like this:
-.br
+.PP
+.RS
 .TS
-center allbox tab(/) ;
+allbox tab(/) ;
 c c c .
 \fBA1\fP/\fBup\fP/\fBA3\fP
 \fBleft\fP/\fBB2\fP/\fBright\fP
 \fBC1\fP/\fBdown\fP/\fBC3\fP
 .TE
+.RE
 .sp
 A few of these predefined values do \fInot\fP correspond to a real key:
 .bP
@@ -399,15 +405,15 @@ The \fBhas_key\fP function is unique to \fBncurses\fP.
 We recommend that
 any code using it be conditionalized on the \fBNCURSES_VERSION\fP feature macro.
 .SH SEE ALSO
-\fBcurses\fP(3X),
-\fBcurs_inopts\fP(3X),
-\fBcurs_mouse\fP(3X),
-\fBcurs_move\fP(3X),
-\fBcurs_outopts\fP(3X),
-\fBcurs_refresh\fP(3X),
-\fBcurs_variables\fP(3X),
-\fBresizeterm\fP(3X).
+\fB\%curses\fP(3X),
+\fB\%curs_inopts\fP(3X),
+\fB\%curs_mouse\fP(3X),
+\fB\%curs_move\fP(3X),
+\fB\%curs_outopts\fP(3X),
+\fB\%curs_refresh\fP(3X),
+\fB\%curs_variables\fP(3X),
+\fB\%resizeterm\fP(3X)
 .PP
 Comparable functions in the wide-character (ncursesw) library are
 described in
-\fBcurs_get_wch\fP(3X).
+\fB\%curs_get_wch\fP(3X).