Added TERMKEY_FORMAT_WRAPBRACKET

This commit is contained in:
Paul LeoNerd Evans
2008-10-06 22:33:49 +01:00
parent 5b24e42d90
commit 0b8680daa4
3 changed files with 20 additions and 8 deletions

12
demo.c
View File

@@ -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 &&