From 46ef83fdf450324f6372eb1a358c4b0773ebfd1d Mon Sep 17 00:00:00 2001 From: Paul LeoNerd Evans Date: Sat, 23 Feb 2008 19:37:27 +0000 Subject: Nicer names for modifiers on printed output --- demo.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/demo.c b/demo.c index c1c820c..a2d431c 100644 --- a/demo.c +++ b/demo.c @@ -26,16 +26,16 @@ int main(int argc, char *argv[]) { while((ret = termkey_waitkey(tk, &key)) != TERMKEY_RES_EOF) { if(key.flags & TERMKEY_KEYFLAG_SPECIAL) printf("Key %s%s%s%s (code %d)\n", - key.modifiers & TERMKEY_KEYMOD_SHIFT ? "S-" : "", - key.modifiers & TERMKEY_KEYMOD_ALT ? "A-" : "", - key.modifiers & TERMKEY_KEYMOD_CTRL ? "C-" : "", + key.modifiers & TERMKEY_KEYMOD_SHIFT ? "Shift-" : "", + key.modifiers & TERMKEY_KEYMOD_ALT ? "Alt-" : "", + key.modifiers & TERMKEY_KEYMOD_CTRL ? "Ctrl-" : "", termkey_describe_sym(tk, key.code), key.code); else printf("Key %s%s%s%s (U+%04X)\n", - key.modifiers & TERMKEY_KEYMOD_SHIFT ? "S-" : "", - key.modifiers & TERMKEY_KEYMOD_ALT ? "A-" : "", - key.modifiers & TERMKEY_KEYMOD_CTRL ? "C-" : "", + key.modifiers & TERMKEY_KEYMOD_SHIFT ? "Shift-" : "", + key.modifiers & TERMKEY_KEYMOD_ALT ? "Alt-" : "", + key.modifiers & TERMKEY_KEYMOD_CTRL ? "Ctrl-" : "", key.utf8, key.code); -- cgit v1.2.3-70-g09d2