aboutsummaryrefslogtreecommitdiff
path: root/man/termkey_interpret_modereport.3
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-11-30 16:34:47 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2012-11-30 16:34:47 +0000
commit0be6f18019e1a5f5765c2061f7d69436e5fdec57 (patch)
treee76d2840e4d04b851b8afdd2d019899b706bedda /man/termkey_interpret_modereport.3
parentc00f6cd3c63e01c84220b607eccf5a2ba2df8f63 (diff)
downloadtermo-0be6f18019e1a5f5765c2061f7d69436e5fdec57.tar.gz
termo-0be6f18019e1a5f5765c2061f7d69436e5fdec57.tar.xz
termo-0be6f18019e1a5f5765c2061f7d69436e5fdec57.zip
Handle ANSI and DEC mode report CSIs
Diffstat (limited to 'man/termkey_interpret_modereport.3')
-rw-r--r--man/termkey_interpret_modereport.326
1 files changed, 26 insertions, 0 deletions
diff --git a/man/termkey_interpret_modereport.3 b/man/termkey_interpret_modereport.3
new file mode 100644
index 0000000..d778655
--- /dev/null
+++ b/man/termkey_interpret_modereport.3
@@ -0,0 +1,26 @@
+.TH TERMKEY_INTERPRET_MODEREPORT 3
+.SH NAME
+termkey_interpret_modereport \- interpret opaque mode report data
+.SH SYNOPSIS
+.nf
+.B #include <termkey.h>
+.sp
+.BI "TermKeyResult termkey_interpret_modereport(TermKey *" tk ", const TermKeyKey *" key ", "
+.BI " int *" initial ", int *" mode ", int *" value );
+.fi
+.sp
+Link with \fI-ltermkey\fP.
+.SH DESCRIPTION
+\fBtermkey_interpret_modereport\fP() fills in variables in the passed pointers according to the mode report 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_MODEREPORT\fP.
+.PP
+Any pointer may instead be given as \fBNULL\fP to not return that value.
+.PP
+The \fIinitial\fP variable will be filled with 0 for an ANSI mode report, or \f(CW'?'\fP for a DEC mode report. The \fImode\fP variable will be filled with the number of the mode, and \fIvalue\fP will be filled with the value from the report.
+.SH "RETURN VALUE"
+If passed a \fIkey\fP event of the type \fBTERMKEY_TYPE_MODEREPORT\fP, this function will return \fBTERMKEY_RES_KEY\fP and will affect the variables whose pointers were passed in, as described above.
+.PP
+For other event types it will return \fBTERMKEY_RES_NONE\fP, and its effects on any variables whose pointers were passed in, are undefined.
+.SH "SEE ALSO"
+.BR termkey_waitkey (3),
+.BR termkey_getkey (3),
+.BR termkey (7)