diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2009-11-27 14:36:29 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2009-11-27 14:36:29 +0000 |
commit | 24f97118465817c09c28103e7c94252b28fa06aa (patch) | |
tree | b46a911ef72301f60a522d4d95be239e1ef9bc10 /termkey_getkey.3.sh | |
parent | 6dc2b9c72bf121aed0f9011d925b2c551a22ada2 (diff) | |
download | termo-24f97118465817c09c28103e7c94252b28fa06aa.tar.gz termo-24f97118465817c09c28103e7c94252b28fa06aa.tar.xz termo-24f97118465817c09c28103e7c94252b28fa06aa.zip |
Return opaque mouse events in the key structure; add a function to interpret this into its component fields
Diffstat (limited to 'termkey_getkey.3.sh')
-rw-r--r-- | termkey_getkey.3.sh | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/termkey_getkey.3.sh b/termkey_getkey.3.sh index b0ddc68..c4f08ee 100644 --- a/termkey_getkey.3.sh +++ b/termkey_getkey.3.sh @@ -40,13 +40,10 @@ The \fITermKeyKey\fP structure is defined as follows: typedef struct { TermKeyType type; union { - long codepoint; /* TERMKEY_TYPE_UNICODE */ - int number; /* TERMKEY_TYPE_FUNCTION */ - TermKeySym sym; /* TERMKEY_TYPE_KEYSYM */ - struct { - short buttons; - short line, col; - } mouse; /* TERMKEY_TYPE_MOUSE */ + long codepoint; /* TERMKEY_TYPE_UNICODE */ + int number; /* TERMKEY_TYPE_FUNCTION */ + TermKeySym sym; /* TERMKEY_TYPE_KEYSYM */ + char mouse[4] /* TERMKEY_TYPE_MOUSE */ } code; int modifiers; char utf8[7]; @@ -66,7 +63,7 @@ a numbered function key. This value indicates that \fIcode.number\fP is valid, a 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. +a mouse button press, release, or movement. The \fIcode.mouse\fP array should be considered opaque. Use \fBtermkey_interpret_mouse\fP(3) to interpret it. .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 @@ -91,5 +88,6 @@ cat <<EOF .BR termkey_waitkey (3), .BR termkey_set_waittime (3), .BR termkey_get_keyname (3), +.BR termkey_interpret_mouse (3), .BR termkey_snprint_key (3) EOF |