aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-11-30 14:43:00 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-11-30 14:43:00 +0000
commitd5c3d9c8fe500340c081ea3e0a4b575b3369d0dd (patch)
tree27af0469cc7eb81e9413c73c38881754ec35f4c4 /man
parent26912d989b88741cb581ce1d261b096172260886 (diff)
downloadtermo-d5c3d9c8fe500340c081ea3e0a4b575b3369d0dd.tar.gz
termo-d5c3d9c8fe500340c081ea3e0a4b575b3369d0dd.tar.xz
termo-d5c3d9c8fe500340c081ea3e0a4b575b3369d0dd.zip
Also interpret an intermediate CSI byte if present
Diffstat (limited to 'man')
-rw-r--r--man/termkey_interpret_csi.36
1 files changed, 5 insertions, 1 deletions
diff --git a/man/termkey_interpret_csi.3 b/man/termkey_interpret_csi.3
index fa0444d..0939d40 100644
--- a/man/termkey_interpret_csi.3
+++ b/man/termkey_interpret_csi.3
@@ -13,7 +13,11 @@ Link with \fI-ltermkey\fP.
.SH DESCRIPTION
\fBtermkey_interpret_csi\fP() fills in variables in the passed pointers according to the unrecognised CSI sequence event found in \fIkey\fP. It should be called if \fBtermkey_getkey\fP(3) or similar have returned a key event with the type of \fBTERMKEY_TYPE_UNKNOWN_CSI\fP. Note that it is important to call this function as soon as possible after obtaining a \fBTERMKEY_TYPE_CSI\fP key event; specifically, before calling \fBtermkey_getkey\fP() or \fBtermkey_waitkey\fP() again, as a subsequent call will overwrite the buffer space currently containing this sequence.
.PP
-The \fIargs\fP array will be filled with the numerical arguments of the CSI sequence. The number of elements available in this array should be given as the initial value of the value pointed to by \fInargs\fP, which will be adjusted to give the number of arguments actually found when the function returns. The \fIcmd\fP variable will contain the CSI command value. If a leading byte was found (such as '\f(CW$\fP') then it will be bitwise-ored with the command value, shifted up by 8 bits.
+The \fIargs\fP array will be filled with the numerical arguments of the CSI sequence. The number of elements available in this array should be given as the initial value of the value pointed to by \fInargs\fP, which will be adjusted to give the number of arguments actually found when the function returns. The \fIcmd\fP variable will contain the CSI command value. If a leading byte was found (such as '\f(CW?\fP') then it will be bitwise-ored with the command value, shifted up by 8 bits. If an intermediate byte was found (such as '\f(CW$\fP') then it will be bitwise-ored with the command value, shifted up by 16 bits.
+.nf
+.sp
+ *cmd = command | (initial << 8) | (intermediate << 16);
+.fi
.SH "RETURN VALUE"
If passed a \fIkey\fP event of the type \fBTERMKEY_TYPE_UNKNOWN_CSI\fP, this function will return \fBTERMKEY_RES_KEY\fP and will affect the variables whose pointers were passed in, as described above.
.PP