Cope correctly with XTerm's modified Unicode reporting of Ctrl-C for termination
This commit is contained in:
parent
db22cc6dc7
commit
eb2fed629d
4
demo.c
4
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user