diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-02-23 23:17:31 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-02-23 23:17:31 +0000 |
commit | eb2fed629d9adc979c4b26630f460f61610684d8 (patch) | |
tree | 00ca219ef6f1d87df5026a0a0a0784066e3b64de | |
parent | db22cc6dc7f28cf58c5594072050dbe3095ed99e (diff) | |
download | termo-eb2fed629d9adc979c4b26630f460f61610684d8.tar.gz termo-eb2fed629d9adc979c4b26630f460f61610684d8.tar.xz termo-eb2fed629d9adc979c4b26630f460f61610684d8.zip |
Cope correctly with XTerm's modified Unicode reporting of Ctrl-C for termination
-rw-r--r-- | demo.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |