aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2009-11-24 01:37:46 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2009-11-24 01:37:46 +0000
commitd1842f8a00a3b16f7668efd202bcfa64388af710 (patch)
treef33c9d3eeff500f24f860469fcc32959d713c6e4
parentc9d2bd93fdbe87b6c59d010761a88066fc8a0f4d (diff)
downloadtermo-d1842f8a00a3b16f7668efd202bcfa64388af710.tar.gz
termo-d1842f8a00a3b16f7668efd202bcfa64388af710.tar.xz
termo-d1842f8a00a3b16f7668efd202bcfa64388af710.zip
Document the new mouse reporting interface
-rw-r--r--termkey_getkey.3.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/termkey_getkey.3.sh b/termkey_getkey.3.sh
index 83ef9db..b0ddc68 100644
--- a/termkey_getkey.3.sh
+++ b/termkey_getkey.3.sh
@@ -42,7 +42,11 @@ typedef struct {
union {
long codepoint; /* TERMKEY_TYPE_UNICODE */
int number; /* TERMKEY_TYPE_FUNCTION */
- TermKeySym sym; /* TERMKEY_TYPE_KEYSYM */
+ TermKeySym sym; /* TERMKEY_TYPE_KEYSYM */
+ struct {
+ short buttons;
+ short line, col;
+ } mouse; /* TERMKEY_TYPE_MOUSE */
} code;
int modifiers;
char utf8[7];
@@ -60,6 +64,9 @@ a numbered function key. This value indicates that \fIcode.number\fP is valid, a
.TP
.B TERMKEY_TYPE_KEYSYM
a symbolic key. This value indicates that \fIcode.sym\fP is valid, and contains the symbolic key value. This is an opaque value which may be passed to \fBtermkey_get_keyname\fP(3).
+.TP
+.B TERMKEY_TYPE_MOUSE
+a mouse button press, release, or movement. This value indicates that \fIcode.mouse\fP is valid. The structure will contain the button and cursor co-ordinates information from the terminal mouse event. The \fIbuttons\fP value will depend on the terminal's current mouse mode, which is beyond \fIlibtermkey\fP's control.
.PP
The \fImodifiers\fP bitmask is composed of a bitwise-or of the constants \fBTERMKEY_KEYMOD_SHIFT\fP, \fBTERMKEY_KEYMOD_CTRL\fP and \fBTERMKEY_KEYMOD_ALT\fP.
.PP