📄 getch.3cur
字号:
.TH getch 3cur .SH Namegetch, mvgetch, mvwgetch, wgetch \- read character.SH Syntax.B#include <cursesX.h>.PP.Bint getch(\|).PP.Bint wgetch(win).br.BWINDOW \(**win;.PP.Bint mvgetch(y, x).br.Bint y, x;.PP.Bint mvwgetch(win, y, x).br.BWINDOW \(**win;.br.Bint y, x;.SH Description.NXR "getch macro".NXR "mvgetch macro".NXR "mvwgetch macro".NXR "wgetch subroutine"The.PN getchroutinereads a character from the terminal associated with the default window..PPThe.PN wgetchroutinereads a character from the terminal associated with the specified window..PPThe routine.PN mvgetchreads a character from the terminal associated with the default window at the specified position..PPThe routine.PN mvwgetchreads a character from the terminal associated with the specified window at the specified position..PP The following information applies to all the routines.In.PN nodelaymode, if there is no input waiting, the integer.PN ERRis returned.In.PN delaymode, the program waits until the system passes text through tothe program.Usually the program will restartafter one character or after the first newline,but this depends on how .PN cbreak is set.The character will be echoed on the designated window unless.PN noecho has been set..PPIf .PN keypad is .PN TRUE, and a function key is pressed, the token for that functionkey is returned instead of the raw characters.Possible function keys are defined in the.PN <cursesX.h>header file with integers beginning with0401.The function key names begin withKEY_.Function keys and their respective integer values are describedin the .I Guide to X/Open Curses Screen-Handling.R.PPIf a character is received that could be the beginning of a function key(such as escape),.PN cursessets a timer.If the remainder of the sequence does not come within the designated time, the character will be passed through, otherwise the function key value is returned.Consequently, there may be a delay after auser presses the escape key before the escape is returned to the program..PPUsing the escape key for a single character function isdiscouraged..PPThe routines.PN getch, .PN mvgetchand .PN mvwgetchare macros..SH Return ValuesUpon successful completion, the .PN getch ,.PN mvgetch ,and.PN wgetchfunctions return the character read..PPIf in delay mode and no data is available, ERR is returned..SH See Alsocbreak(3cur), keypad(3cur), nodelay(3cur), noecho(3cur).br.I "Guide to X/Open Curses Screen-Handling"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -