summaryrefslogtreecommitdiff
path: root/pugl_test.c
diff options
context:
space:
mode:
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 af51e53..eb192c9 100644
--- a/pugl_test.c
+++ b/pugl_test.c
@@ -101,15 +101,15 @@ printModifiers(PuglView* view)
static void
onEvent(PuglView* view, const PuglEvent* event)
{
- const uint32_t ucode = event->key.character;
if (event->type == PUGL_KEY_PRESS) {
+ const uint32_t ucode = event->key.character;
fprintf(stderr, "Key %u (char %u) down (%s)%s\n",
- event->key.keycode, event->key.character, event->key.utf8,
+ event->key.keycode, ucode, event->key.utf8,
event->key.filter ? " (filtered)" : "");
- }
- if (ucode == 'q' || ucode == 'Q' || ucode == PUGL_CHAR_ESCAPE ||
- ucode == PUGL_CHAR_DELETE || ucode == PUGL_CHAR_BACKSPACE) {
- quit = 1;
+
+ if (ucode == 'q' || ucode == 'Q' || ucode == PUGL_CHAR_ESCAPE) {
+ quit = 1;
+ }
}
}