aboutsummaryrefslogtreecommitdiff
path: root/man/termkey_getkey.3.sh
diff options
context:
space:
mode:
Diffstat (limited to 'man/termkey_getkey.3.sh')
-rw-r--r--man/termkey_getkey.3.sh5
1 files changed, 4 insertions, 1 deletions
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