aboutsummaryrefslogtreecommitdiff
path: root/demo.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-10-06 22:33:49 +0100
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-10-06 22:33:49 +0100
commit0b8680daa45d22b3d61b064faaf4114d0cf57d0c (patch)
treeab6e6e81937f70ef1d40014e8ce8a387fd04e227 /demo.c
parent5b24e42d90a57479c702b0e6b53271dd5188db70 (diff)
downloadtermo-0b8680daa45d22b3d61b064faaf4114d0cf57d0c.tar.gz
termo-0b8680daa45d22b3d61b064faaf4114d0cf57d0c.tar.xz
termo-0b8680daa45d22b3d61b064faaf4114d0cf57d0c.zip
Added TERMKEY_FORMAT_WRAPBRACKET
Diffstat (limited to 'demo.c')
-rw-r--r--demo.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/demo.c b/demo.c
index feac80c..6e55931 100644
--- a/demo.c
+++ b/demo.c
@@ -10,14 +10,10 @@ int main(int argc, char *argv[]) {
termkey_key key;
while((ret = termkey_waitkey(tk, &key)) != TERMKEY_RES_EOF) {
- if(key.type == TERMKEY_TYPE_UNICODE && !key.modifiers)
- printf("%s\n", key.utf8);
- else {
- termkey_snprint_key(tk, buffer, sizeof buffer, &key, 0);
- printf("<%s> or ", buffer);
- termkey_snprint_key(tk, buffer, sizeof buffer, &key, ~0);
- printf("<%s>\n", buffer);
- }
+ termkey_snprint_key(tk, buffer, sizeof buffer, &key, 0);
+ printf("%s or ", buffer);
+ termkey_snprint_key(tk, buffer, sizeof buffer, &key, ~0);
+ printf("%s\n", buffer);
if(key.type == TERMKEY_TYPE_UNICODE &&
key.modifiers & TERMKEY_KEYMOD_CTRL &&