diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-02-23 19:37:27 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-02-23 19:37:27 +0000 |
commit | 46ef83fdf450324f6372eb1a358c4b0773ebfd1d (patch) | |
tree | 60a9be7c0ea8d3d6818ace95b985e19b1da9b973 /demo.c | |
parent | efb04d3ee2919463ca6c935e387b04ab768b3d94 (diff) | |
download | termo-46ef83fdf450324f6372eb1a358c4b0773ebfd1d.tar.gz termo-46ef83fdf450324f6372eb1a358c4b0773ebfd1d.tar.xz termo-46ef83fdf450324f6372eb1a358c4b0773ebfd1d.zip |
Nicer names for modifiers on printed output
Diffstat (limited to 'demo.c')
-rw-r--r-- | demo.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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); |