From 46eefda07367e63b7ceffeecb2778409f1d4b387 Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Sat, 27 Aug 2011 19:59:02 +0100 Subject: Provide an explicit termkey_canonicalise() function; canonicalise Space/SP in both directions --- termkey_waitkey.3.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'termkey_waitkey.3.sh') diff --git a/termkey_waitkey.3.sh b/termkey_waitkey.3.sh index ee8edaf..754ac21 100644 --- a/termkey_waitkey.3.sh +++ b/termkey_waitkey.3.sh @@ -14,6 +14,8 @@ Link with \fI-ltermkey\fP. .SH DESCRIPTION \fBtermkey_waitkey\fP(3) attempts to retrieve a single keypress event from the buffer, and put it in the structure referred to by \fIkey\fP. If successful it will return \fBTERMKEY_RES_KEY\fP to indicate that the structure now contains a new keypress event. If nothing is in the buffer it will block until one is available. If no events are ready and the input stream is now closed, will return \fBTERMKEY_RES_EOF\fP. .PP +Before returning, this function canonicalises the \fIkey\fP structure according to the rules given for \fBtermkey_canonicalise\fP(3). +.PP For details of the \fITermKeyKey\fP structure, see \fBtermkey_getkey\fP(3). .PP Some keypresses generate multiple bytes from the terminal. Because there may be network or other delays between the terminal and an application using termkey, \fBtermkey_waitkey\fP() will attempt to wait for the remaining bytes to arrive if it detects the start of a multibyte sequence. If no more bytes arrive within a certain time, then the bytes will be reported as they stand, even if this results in interpreting a partially-complete Escape sequence as a literal Escape key followed by some normal letters or other symbols. The amount of time to wait can be set by \fBtermkey_set_waittime\fP(3). -- cgit v1.2.3-54-g00ecf