aboutsummaryrefslogtreecommitdiffstats
path: root/pugl_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-07-23 11:16:04 +0200
committerDavid Robillard <d@drobilla.net>2017-10-03 16:20:52 +0200
commit706166497d2cc2f71fd417c398630fe8790a23e7 (patch)
tree1c09d64e99f65628a5bf66aabf71b86f3e5e043f /pugl_test.c
parent7a05b7c03c3819b2e8f4edcbcc40803a0d808111 (diff)
downloadpugl-706166497d2cc2f71fd417c398630fe8790a23e7.tar.gz
pugl-706166497d2cc2f71fd417c398630fe8790a23e7.tar.bz2
pugl-706166497d2cc2f71fd417c398630fe8790a23e7.zip
Print Unicode code points in standard format
Diffstat (limited to 'pugl_test.c')
-rw-r--r--pugl_test.c12
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;