diff options
author | David Robillard <d@drobilla.net> | 2017-07-23 11:16:04 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-10-03 16:20:52 +0200 |
commit | 706166497d2cc2f71fd417c398630fe8790a23e7 (patch) | |
tree | 1c09d64e99f65628a5bf66aabf71b86f3e5e043f | |
parent | 7a05b7c03c3819b2e8f4edcbcc40803a0d808111 (diff) | |
download | pugl-706166497d2cc2f71fd417c398630fe8790a23e7.tar.gz pugl-706166497d2cc2f71fd417c398630fe8790a23e7.tar.bz2 pugl-706166497d2cc2f71fd417c398630fe8790a23e7.zip |
Print Unicode code points in standard format
-rw-r--r-- | pugl_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pugl_test.c b/pugl_test.c index 367e7a4..b0ea04d 100644 --- a/pugl_test.c +++ b/pugl_test.c @@ -156,9 +156,9 @@ onEvent(PuglView* view, const PuglEvent* event) quit = 1; break; case PUGL_KEY_PRESS: - fprintf(stderr, "Key %u (char %u) press (%s)%s\n", - event->key.keycode, event->key.character, event->key.utf8, - event->key.filter ? " (filtered)" : ""); + fprintf(stderr, "Key %u (char U+%04X special U+%04X) press (%s)%s\n", + event->key.keycode, event->key.character, event->key.special, + event->key.utf8, event->key.filter ? " (filtered)" : ""); if (event->key.character == 'q' || event->key.character == 'Q' || event->key.character == PUGL_CHAR_ESCAPE) { @@ -166,9 +166,9 @@ onEvent(PuglView* view, const PuglEvent* event) } break; case PUGL_KEY_RELEASE: - fprintf(stderr, "Key %u (char %u) release (%s)%s\n", - event->key.keycode, event->key.character, event->key.utf8, - event->key.filter ? " (filtered)" : ""); + fprintf(stderr, "Key %u (char U+%04X special U+%04X) release (%s)%s\n", + event->key.keycode, event->key.character, event->key.special, + event->key.utf8, event->key.filter ? " (filtered)" : ""); break; case PUGL_MOTION_NOTIFY: xAngle = -(int)event->motion.x % 360; |