aboutsummaryrefslogtreecommitdiff
path: root/demo.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-02-07 01:17:59 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-02-07 01:17:59 +0000
commit6294cca6f9bc910b224393e38e3c09eeb821fcb7 (patch)
treeee6f17b08d778eb2bbdbe1e5c30645363bb8b241 /demo.c
parenta503403226e4e2a929efddd4a2d0daad9c33c596 (diff)
downloadtermo-6294cca6f9bc910b224393e38e3c09eeb821fcb7.tar.gz
termo-6294cca6f9bc910b224393e38e3c09eeb821fcb7.tar.xz
termo-6294cca6f9bc910b224393e38e3c09eeb821fcb7.zip
Denote general status with return codes, not special key symbols
Diffstat (limited to 'demo.c')
-rw-r--r--demo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/demo.c b/demo.c
index 512a99f..540861d 100644
--- a/demo.c
+++ b/demo.c
@@ -20,9 +20,10 @@ int main(int argc, char *argv[]) {
termkey_t *tk = termkey_new(0, TERMKEY_FLAG_CONVERTKP);
+ termkey_result ret;
termkey_key key;
- while(termkey_waitkey(tk, &key) && key.code != TERMKEY_SYM_EOF) {
+ while((ret = termkey_waitkey(tk, &key)) != TERMKEY_RES_EOF) {
if(key.flags & TERMKEY_KEYFLAG_SPECIAL)
printf("Key %s%s%s%s (code %d)\n",
key.modifiers & TERMKEY_KEYMOD_SHIFT ? "S-" : "",