From 775806d32b73ebfe7abaec6e172de336431eca0d Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Thu, 8 Mar 2012 21:58:27 +0000 Subject: Added documentation for termkey_{start,stop}, termkey_is_started --- man/termkey_getkey.3.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'man/termkey_getkey.3.sh') diff --git a/man/termkey_getkey.3.sh b/man/termkey_getkey.3.sh index c18b5a8..2f1b716 100644 --- a/man/termkey_getkey.3.sh +++ b/man/termkey_getkey.3.sh @@ -27,6 +27,9 @@ no bytes are waiting in the buffer. .TP .B TERMKEY_RES_EOF no bytes are ready and the input stream is now closed. +.TP +.B TERMKEY_RES_ERROR +called with terminal IO stopped, due to \fBtermkey_stop\fP(3). In this case \fIerrno\fP will be set to \fBEINVAL\fP. .PP \fBtermkey_getkey_force\fP() is similar to \fBtermkey_getkey\fP() but will not return \fBTERMKEY_RES_AGAIN\fP if a partial match is found. Instead, it will force an interpretation of the bytes, even if this means interpreting the start of an Escape-prefixed multi-byte sequence as a literal "Escape" key followed by normal letters. .PP @@ -34,7 +37,7 @@ Neither of these functions will block or perform any IO operations on the underl .PP Before returning, this function canonicalises the \fIkey\fP structure according to the rules given for \fBtermkey_canonicalise\fP(3). .SH "RETURN VALUE" -\fBtermkey_getkey\fP() returns an enumeration of one of \fBTERMKEY_RES_KEY\fP, \fBTEMRKEY_RES_AGAIN\fP, \fBTERMKEY_RES_NONE\fP or \fBTERMKEY_RES_EOF\fP. \fBtermkey_getkey_force\fP() returns one of the above, except for \fBTERMKEY_RES_AGAIN\fP. +\fBtermkey_getkey\fP() returns an enumeration of one of \fBTERMKEY_RES_KEY\fP, \fBTEMRKEY_RES_AGAIN\fP, \fBTERMKEY_RES_NONE\fP, \fBTERMKEY_RES_EOF\fP or \fBTERMKEY_RES_ERROR\fP. \fBtermkey_getkey_force\fP() returns one of the above, except for \fBTERMKEY_RES_AGAIN\fP. .SH EXAMPLE The following example program prints details of every keypress until the user presses "Ctrl-C". It demonstrates how to use the \fBtermkey\fP instance in a typical \fBpoll\fP(2)-driven asynchronous program, which may include mixed IO with other file handles. .PP -- cgit v1.2.3