aboutsummaryrefslogtreecommitdiff
path: root/demo.c
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-02-23 23:17:31 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-02-23 23:17:31 +0000
commiteb2fed629d9adc979c4b26630f460f61610684d8 (patch)
tree00ca219ef6f1d87df5026a0a0a0784066e3b64de /demo.c
parentdb22cc6dc7f28cf58c5594072050dbe3095ed99e (diff)
downloadtermo-eb2fed629d9adc979c4b26630f460f61610684d8.tar.gz
termo-eb2fed629d9adc979c4b26630f460f61610684d8.tar.xz
termo-eb2fed629d9adc979c4b26630f460f61610684d8.zip
Cope correctly with XTerm's modified Unicode reporting of Ctrl-C for termination
Diffstat (limited to 'demo.c')
-rw-r--r--demo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demo.c b/demo.c
index e086445..3b16fc2 100644
--- a/demo.c
+++ b/demo.c
@@ -17,14 +17,14 @@ int main(int argc, char *argv[]) {
termkey_get_keyname(tk, key.code),
key.code);
else
- printf("Key %s%s%s%s (U+%04X)\n",
+ printf("Unicode %s%s%s%s (U+%04X)\n",
key.modifiers & TERMKEY_KEYMOD_SHIFT ? "Shift-" : "",
key.modifiers & TERMKEY_KEYMOD_ALT ? "Alt-" : "",
key.modifiers & TERMKEY_KEYMOD_CTRL ? "Ctrl-" : "",
key.utf8,
key.code);
- if(key.modifiers & TERMKEY_KEYMOD_CTRL && key.code == 'C')
+ if(key.modifiers & TERMKEY_KEYMOD_CTRL && (key.code == 'C' || key.code == 'c'))
break;
}