aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-30 12:43:13 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-11-30 12:43:13 +0000
commit8737046c4d42c223be6381a66fbee3fbe5cdbb97 (patch)
tree021e158fbf449f978ebe17b0b9216a2a6b8e3483
parent39b810f0b8889e3207dab335180132126c04e00d (diff)
downloadtermo-8737046c4d42c223be6381a66fbee3fbe5cdbb97.tar.gz
termo-8737046c4d42c223be6381a66fbee3fbe5cdbb97.tar.xz
termo-8737046c4d42c223be6381a66fbee3fbe5cdbb97.zip
Extra documentation about the three types of key event structure, and what the code members mean
-rw-r--r--termkey_getkey.3.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/termkey_getkey.3.sh b/termkey_getkey.3.sh
index 6f0ee63..00d9013 100644
--- a/termkey_getkey.3.sh
+++ b/termkey_getkey.3.sh
@@ -40,13 +40,13 @@ typedef struct {
The \fItype\fP field indicates the type of event, and determines which of the members of the \fIcode\fP union is valid. It will be one of the following constants:
.TP
.B TERMKEY_TYPE_UNICODE
-a Unicode codepoint
+a Unicode codepoint. This value indicates that \fIcode.codepoint\fP is valid, and will contain the codepoint number of the keypress. In Unicode mode (if the \fBTERMKEY_FLAG_UTF8\fP bit is set) this will be its Unicode character number. In raw byte mode, this will contain a single 8-bit byte.
.TP
.B TERMKEY_TYPE_FUNCTION
-a numbered function key
+a numbered function key. This value indicates that \fIcode.number\fP is valid, and contains the number of the numbered function key.
.TP
.B TERMKEY_TYPE_KEYSYM
-a symbolic key
+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).
.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