Sortix main manual
This manual documents Sortix main. You can instead view this document in the latest official manual.
NAME
curses_input, getch, wgetch, mvgetch, mvwgetch, define_key, keyok, has_key, getnstr, wgetnstr, mvgetnstr, mvwgetnstr, getstr, wgetstr, mvgetstr, mvwgetstr, keypad, is_keypad, notimeout, timeout, wtimeout, nodelay, ungetch, set_escdelay — curses input stream routinesLIBRARY
Curses Library (libcurses, -lcurses)SYNOPSIS
#include <curses.h>getch(void);
wgetch(WINDOW *win);
mvgetch(int y, int x);
mvwgetch(WINDOW *win, int y, int x);
keyok(int key_symbol, bool flag);
has_key(int key_symbol);
define_key(char *sequence, int key_symbol);
getnstr(char *str, int limit);
wgetnstr(WINDOW *win, char *str, int limit);
mvgetnstr(int y, int x, char *str, int limit);
mvwgetnstr(WINDOW *win, int y, int x, char *str, int limit);
getstr(char *str);
wgetstr(WINDOW *win, char *str);
mvgetstr(int y, int x, char *str);
mvwgetstr(WINDOW *win, int y, int x, char *str);
keypad(WINDOW *win, boolf flag);
is_keypad(const WINDOW *win);
notimeout(WINDOW *win, boolf flag);
timeout(int delay);
wtimeout(WINDOW *win, int delay);
nodelay(WINDOW *win, boolf flag);
ungetch(int c);
set_escdelay(int escdelay);
DESCRIPTION
These functions read characters and strings from the window input file descriptor.RETURN VALUES
The functions getch(), wgetch(), mvgetch(), and mvwgetch() will return the value of the key pressed or ERR in the case of an error or a timeout. Additionally, if keypad(TRUE) has been called on a window, then it may return one of the following values:Termcap entry | getch Return Value | Key Function |
!1 | KEY_SSAVE | Shift Save |
!2 | KEY_SSUSPEND | Shift Suspend |
!3 | KEY_SUNDO | Shift Undo |
#1 | KEY_SHELP | Shift Help |
#2 | KEY_SHOME | Shift Home |
#3 | KEY_SIC | Shift Insert Character |
#4 | KEY_SLEFT | Shift Left Arrow |
%0 | KEY_REDO | Redo |
%1 | KEY_HELP | Help |
%2 | KEY_MARK | Mark |
%3 | KEY_MESSAGE | Message |
%4 | KEY_MOVE | Move |
%5 | KEY_NEXT | Next Object |
%6 | KEY_OPEN | Open |
%7 | KEY_OPTIONS | Options |
%8 | KEY_PREVIOUS | Previous Object |
%9 | KEY_PRINT | |
%a | KEY_SMESSAGE | Shift Message |
%b | KEY_SMOVE | Shift Move |
%c | KEY_SNEXT | Shift Next Object |
%d | KEY_SOPTIONS | Shift Options |
%e | KEY_SPREVIOUS | Shift Previous Object |
%f | KEY_SPRINT | Shift Print |
%g | KEY_SREDO | Shift Redo |
%h | KEY_SREPLACE | Shift Replace |
%i | KEY_SRIGHT | Shift Right Arrow |
%j | KEY_SRSUME | Shift Resume |
&0 | KEY_SCANCEL | Shift Cancel |
&1 | KEY_REFERENCE | Reference |
&2 | KEY_REFRESH | Refresh |
&3 | KEY_REPLACE | Replace |
&4 | KEY_RESTART | Restart |
&5 | KEY_RESUME | Resume |
&6 | KEY_SAVE | Save |
&7 | KEY_SUSPEND | Suspend |
&8 | KEY_UNDO | Undo |
&9 | KEY_SBEG | Shift Begin |
*0 | KEY_SFIND | Shift Find |
*1 | KEY_SCOMMAND | Shift Command |
*2 | KEY_SCOPY | Shift Copy |
*3 | KEY_SCREATE | Shift Create |
*4 | KEY_SDC | Shift Delete Character |
*5 | KEY_SDL | Shift Delete Line |
*6 | KEY_SELECT | Select |
*7 | KEY_SEND | Shift End |
*8 | KEY_SEOL | Shift Clear to EOL |
*9 | KEY_SEXIT | Shift Exit |
@0 | KEY_FIND | Find |
@1 | KEY_BEG | Begin |
@2 | KEY_CANCEL | Cancel |
@3 | KEY_CLOSE | Close |
@4 | KEY_COMMAND | Command |
@5 | KEY_COPY | Copy |
@6 | KEY_CREATE | Create |
@7 | KEY_END | End |
@8 | KEY_ENTER | Enter |
@9 | KEY_EXIT | Exit |
F1 | KEY_F(11) | Function Key 11 |
F2 | KEY_F(12) | Function Key 12 |
F3 | KEY_F(13) | Function Key 13 |
F4 | KEY_F(14) | Function Key 14 |
F5 | KEY_F(15) | Function Key 15 |
F6 | KEY_F(16) | Function Key 16 |
F7 | KEY_F(17) | Function Key 17 |
F8 | KEY_F(18) | Function Key 18 |
F9 | KEY_F(19) | Function Key 19 |
FA | KEY_F(20) | Function Key 20 |
FB | KEY_F(21) | Function Key 21 |
FC | KEY_F(22) | Function Key 22 |
FD | KEY_F(23) | Function Key 23 |
FE | KEY_F(24) | Function Key 24 |
FF | KEY_F(25) | Function Key 25 |
FG | KEY_F(26) | Function Key 26 |
FH | KEY_F(27) | Function Key 27 |
FI | KEY_F(28) | Function Key 28 |
FJ | KEY_F(29) | Function Key 29 |
FK | KEY_F(30) | Function Key 30 |
FL | KEY_F(31) | Function Key 31 |
FM | KEY_F(32) | Function Key 32 |
FN | KEY_F(33) | Function Key 33 |
FO | KEY_F(34) | Function Key 34 |
FP | KEY_F(35) | Function Key 35 |
FQ | KEY_F(36) | Function Key 36 |
FR | KEY_F(37) | Function Key 37 |
FS | KEY_F(38) | Function Key 38 |
FT | KEY_F(39) | Function Key 39 |
FU | KEY_F(40) | Function Key 40 |
FV | KEY_F(41) | Function Key 41 |
FW | KEY_F(42) | Function Key 42 |
FX | KEY_F(43) | Function Key 43 |
FY | KEY_F(44) | Function Key 44 |
FZ | KEY_F(45) | Function Key 45 |
Fa | KEY_F(46) | Function Key 46 |
Fb | KEY_F(47) | Function Key 47 |
Fc | KEY_F(48) | Function Key 48 |
Fd | KEY_F(49) | Function Key 49 |
Fe | KEY_F(50) | Function Key 50 |
Ff | KEY_F(51) | Function Key 51 |
Fg | KEY_F(52) | Function Key 52 |
Fh | KEY_F(53) | Function Key 53 |
Fi | KEY_F(54) | Function Key 54 |
Fj | KEY_F(55) | Function Key 55 |
Fk | KEY_F(56) | Function Key 56 |
Fl | KEY_F(57) | Function Key 57 |
Fm | KEY_F(58) | Function Key 58 |
Fn | KEY_F(59) | Function Key 59 |
Fo | KEY_F(60) | Function Key 60 |
Fp | KEY_F(61) | Function Key 61 |
Fq | KEY_F(62) | Function Key 62 |
Fr | KEY_F(63) | Function Key 63 |
K1 | KEY_A1 | Upper left key in keypad |
K2 | KEY_B2 | Centre key in keypad |
K3 | KEY_A3 | Upper right key in keypad |
K4 | KEY_C1 | Lower left key in keypad |
K5 | KEY_C3 | Lower right key in keypad |
Km | KEY_MOUSE | Mouse Event |
k0 | KEY_F0 | Function Key 0 |
k1 | KEY_F(1) | Function Key 1 |
k2 | KEY_F(2) | Function Key 2 |
k3 | KEY_F(3) | Function Key 3 |
k4 | KEY_F(4) | Function Key 4 |
k5 | KEY_F(5) | Function Key 5 |
k6 | KEY_F(6) | Function Key 6 |
k7 | KEY_F(7) | Function Key 7 |
k8 | KEY_F(8) | Function Key 8 |
k9 | KEY_F(9) | Function Key 9 |
k; | KEY_F(10) | Function Key 10 |
kA | KEY_IL | Insert Line |
ka | KEY_CATAB | Clear All Tabs |
kB | KEY_BTAB | Back Tab |
kb | KEY_BACKSPACE | Backspace |
kC | KEY_CLEAR | Clear |
kD | KEY_DC | Delete Character |
kd | KEY_DOWN | Down Arrow |
kE | KEY_EOL | Clear to End Of Line |
kF | KEY_SF | Scroll Forward one line |
kH | KEY_LL | Home Down |
kh | KEY_HOME | Home |
kI | KEY_IC | Insert Character |
kL | KEY_DL | Delete Line |
kl | KEY_LEFT | Left Arrow |
kM | KEY_EIC | Exit Insert Character Mode |
kN | KEY_NPAGE | Next Page |
kP | KEY_PPAGE | Previous Page |
kR | KEY_SR | Scroll One Line Back |
kr | KEY_RIGHT | Right Arrow |
kS | KEY_EOS | Clear to End Of Screen |
kT | KEY_STAB | Set Tab |
kt | KEY_CTAB | Clear Tab |
ku | KEY_UP | Up Arrow |
- OK
- The function completed successfully.
- ERR
- An error occurred in the function.